/* ==============================
   AI ADVISOR PAGE STYLES
============================== */

/* Navigation Styles */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64ffda;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: #64ffda;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64ffda;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: scale(1.1);
}

/* Header Section */
.advisor-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(100, 255, 218, 0.1));
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.advisor-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.header-icon {
    font-size: 3.5rem;
    color: #64ffda;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.advisor-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #64ffda;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.advisor-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
}

/* Main Content */
.advisor-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.advisor-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Info Panel */
.advisor-info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
    transform: translateY(-5px);
}

.info-card i {
    font-size: 2.5rem;
    color: #64ffda;
    margin-bottom: 0.75rem;
    display: block;
}

.info-card h3 {
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Chat Container */
.chat-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 255, 218, 0.5);
}

/* Messages */
.message {
    display: flex;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.assistant-message .message-avatar {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
}

.user-message .message-avatar {
    background: rgba(100, 100, 255, 0.2);
    color: #64a0ff;
}

.message-content {
    flex: 1;
    padding: 1rem;
    border-radius: 0.5rem;
    word-wrap: break-word;
}

.assistant-message .message-content {
    background: rgba(100, 255, 218, 0.08);
    border: 1px solid rgba(100, 255, 218, 0.15);
    color: #f1f5f9;
}

.user-message .message-content {
    background: rgba(100, 100, 255, 0.15);
    border: 1px solid rgba(100, 100, 255, 0.2);
    color: #f1f5f9;
    margin-left: auto;
    max-width: 70%;
}

.message-content p {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-time {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem !important;
}

.suggestions {
    list-style: none;
    padding: 0.5rem 0 0 0;
    margin: 0.5rem 0 0 0;
}

.suggestions li {
    padding: 0.25rem 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Chat Input Area */
.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.chat-form {
    margin-bottom: 0.75rem;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 0.5rem;
    color: #f1f5f9;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #64ffda;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.2);
}

.chat-input::placeholder {
    color: #64748b;
}

.send-btn {
    padding: 0.875rem 1rem;
    background: #64ffda;
    border: none;
    border-radius: 0.5rem;
    color: #0f172a;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: #fff;
    transform: scale(1.05);
}

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

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

.input-disclaimer {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quick Actions Section */
.quick-actions-section {
    background: rgba(100, 255, 218, 0.05);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
    margin: 2rem 0;
}

.quick-actions-container {
    max-width: 1000px;
    margin: 0 auto;
}

.quick-actions-section h2 {
    color: #64ffda;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.quick-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 0.5rem;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-action-btn:hover {
    background: rgba(100, 255, 218, 0.15);
    border-color: #64ffda;
    color: #64ffda;
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #64ffda;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #64ffda;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.social-links li a {
    display: inline-flex;
    padding: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    color: #64748b;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64ffda;
    animation: pulse 1.4s infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .advisor-title {
        font-size: 1.75rem;
    }

    .info-card {
        padding: 1rem;
    }

    .chat-container {
        height: 500px;
    }

    .user-message .message-content {
        max-width: 100%;
    }

    .quick-action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .advisor-header {
        padding: 2rem 1rem;
    }

    .advisor-main {
        padding: 2rem 1rem;
    }

    .chat-messages {
        padding: 1.5rem;
    }

    .chat-input-area {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header-icon {
        font-size: 2.5rem;
    }

    .advisor-title {
        font-size: 1.5rem;
    }

    .advisor-subtitle {
        font-size: 0.95rem;
    }

    .message {
        flex-direction: column;
    }

    .user-message {
        flex-direction: column-reverse;
    }

    .user-message .message-content {
        max-width: 100%;
    }

    .quick-action-buttons {
        grid-template-columns: 1fr;
    }

    .quick-action-btn {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .chat-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Light Theme Adjustments */
html[data-theme="light"] .advisor-title {
    color: #2563eb;
}

html[data-theme="light"] .nav-logo {
    color: #2563eb;
}

html[data-theme="light"] .header-icon {
    color: #2563eb;
}

html[data-theme="light"] .advisor-header {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.8), rgba(37, 99, 235, 0.1));
}

html[data-theme="light"] .info-card {
    background: rgba(37, 99, 235, 0.03);
    border-color: rgba(37, 99, 235, 0.1);
}

html[data-theme="light"] .info-card:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
}

html[data-theme="light"] .info-card i {
    color: #2563eb;
}

html[data-theme="light"] .chat-input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
    color: #111111;
}

html[data-theme="light"] .chat-input:focus {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

html[data-theme="light"] .send-btn {
    background: #2563eb;
    color: #fff;
}

html[data-theme="light"] .send-btn:hover {
    background: #1d4ed8;
}

html[data-theme="light"] .quick-action-section h2 {
    color: #2563eb;
}

html[data-theme="light"] .quick-action-btn {
    background: rgba(37, 99, 235, 0.03);
    border-color: rgba(37, 99, 235, 0.1);
    color: #111111;
}

html[data-theme="light"] .quick-action-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
    color: #2563eb;
}
