/* AI Copilot + Help Widget Styles */

/* Widget Container */
#copilot-widget {
    position: relative;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Toggle Button */
.copilot-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border: none;
    color: var(--primary-charcoal);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(201, 168, 106, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    font-weight: 700;
}

.copilot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(201, 168, 106, 0.5);
}

.copilot-toggle-btn:active {
    transform: scale(0.95);
}

/* Chat Panel */
.copilot-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 550px;
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(26, 26, 26, 0.15);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.copilot-hidden {
    display: none;
}

/* Header */
.copilot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.05) 0%, transparent 100%);
}

.copilot-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.copilot-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.copilot-close:hover {
    color: var(--accent-gold);
}

/* Tabs */
.copilot-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--background-pearl);
}

.copilot-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.copilot-tab:hover {
    color: var(--text-primary);
    background-color: rgba(201, 168, 106, 0.05);
}

.copilot-tab-active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Content Area */
.copilot-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.copilot-tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.copilot-tab-content-active {
    display: flex;
}

/* What Can I Ask Section */
.copilot-what-can-ask {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background-color: rgba(201, 168, 106, 0.05);
}

.copilot-what-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.copilot-what-examples {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.copilot-what-example {
    font-size: 0.8rem;
    color: var(--text-primary);
    padding: 0.3rem 0;
    line-height: 1.3;
}

.copilot-what-example strong {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Messages */
#copilot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.copilot-message {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.copilot-message-user {
    justify-content: flex-end;
}

.copilot-message-copilot {
    justify-content: flex-start;
}

.copilot-message-content {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.copilot-message-user .copilot-message-content {
    background-color: var(--accent-gold);
    color: var(--primary-charcoal);
    border-radius: 12px 4px 12px 12px;
    font-weight: 500;
}

.copilot-message-copilot .copilot-message-content {
    background-color: var(--background-pearl);
    color: var(--text-primary);
    border-radius: 4px 12px 12px 12px;
    border: 1px solid var(--border-light);
}

/* Sample Prompts */
.copilot-sample-prompts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.copilot-sample-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.copilot-sample-prompt {
    padding: 0.75rem;
    background-color: var(--background-pearl);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.copilot-sample-prompt:hover {
    background-color: rgba(201, 168, 106, 0.1);
    border-color: var(--accent-gold);
    transform: translateX(2px);
}

/* Help Content */
.copilot-help-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.copilot-help-topics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.copilot-help-topic {
    padding: 0.75rem;
    background-color: var(--background-pearl);
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold);
}

.copilot-help-topic h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.copilot-help-topic p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Footer */
.copilot-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    background-color: var(--background-pearl);
}

.copilot-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.copilot-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--background-white);
    transition: var(--transition-smooth);
}

.copilot-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.1);
}

.copilot-input::placeholder {
    color: var(--text-light);
}

.copilot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: var(--accent-gold);
    border: none;
    color: var(--primary-charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.copilot-send-btn:hover {
    background-color: var(--accent-gold-light);
    transform: translateY(-2px);
}

.copilot-send-btn:active {
    transform: translateY(0);
}

.copilot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copilot-disclaimer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-light);
    background-color: rgba(201, 168, 106, 0.02);
    padding: 0.5rem;
    border-radius: 4px;
    line-height: 1.4;
}

/* Panel positioning relative to button */
#copilot-widget .copilot-panel {
    position: fixed;
    bottom: calc(1.5rem + 56px + 1rem);
    right: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #copilot-widget .copilot-panel {
        bottom: calc(1rem + 56px + 0.75rem);
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .copilot-panel {
        width: calc(100vw - 2rem);
        height: 70vh;
        max-height: 550px;
        bottom: calc(1rem + 48px + 0.5rem) !important;
        right: 1rem !important;
    }

    .copilot-message-content {
        max-width: 90%;
    }

    .copilot-toggle-btn {
        width: 48px;
        height: 48px;
    }

    .copilot-tab {
        font-size: 0.8rem;
    }
}

/* Scrollbar Styling */
#copilot-messages::-webkit-scrollbar,
.copilot-help-content::-webkit-scrollbar {
    width: 6px;
}

#copilot-messages::-webkit-scrollbar-track,
.copilot-help-content::-webkit-scrollbar-track {
    background: transparent;
}

#copilot-messages::-webkit-scrollbar-thumb,
.copilot-help-content::-webkit-scrollbar-thumb {
    background-color: var(--border-subtle);
    border-radius: 3px;
}

#copilot-messages::-webkit-scrollbar-thumb:hover,
.copilot-help-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-light);
}
