/* Main Styles for H5 Platform - Black, Gold & White Theme */

:root {
    --primary-color: #FFD700; /* Gold as specified */
    --primary-hover: #E6C200; /* Slightly darker gold for hover states */
    --secondary-color: #6c757d; /* Kept for subtle elements */
    --light-color: #ffffff; /* Pure white */
    --dark-color: #000000; /* Pure black */
    --off-white: #f8f9fa; /* Off-white for backgrounds */
    --dark-gold: #DAA520; /* Darker gold for accents */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: var(--off-white);
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    background-color: #000000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Add navbar menu color white */
.navbar .nav-link {
    color: white !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.hero-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.2rem;
    line-height: 1.6;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--dark-color); /* Black text on gold buttons as specified */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chat-window {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.5s ease;
    border: 1px solid rgba(212, 175, 55, 0.2); /* Subtle gold border */
}

.chat-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.chat-header {
    background-color: #323131;
    color: var(--primary-color);
    padding: 1rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.chat-body {
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
}

.message {
    padding: 0.8rem 1.2rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    max-width: 80%;
}

.message-received {
    background-color: #f1f2f6;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.message-sent {
    background-color: #4f4f4f;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    margin-left: auto;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2); /* Subtle gold border */
    background-color: white;
}

.features-section {
    padding: 80px 0;
    background-color: white;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(212, 175, 55, 0.1); /* Very subtle gold border */
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(212, 175, 55, 0.3); /* More visible gold border on hover */
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
}

.feature-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, #222222 100%);
    padding: 60px 0;
    color: white;
    border-top: 3px solid var(--primary-color); /* Gold accent line */
    border-bottom: 3px solid var(--primary-color); /* Gold accent line */
}

footer {
    background-color: #0a0a0a; /* Rich black */
    color: #8b939e;
    padding: 60px 0 20px;
}

footer h5 {
    color: var(--primary-color); /* Gold headings in footer */
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer ul {
    list-style: none;
    padding-left: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer a {
    color: #8b939e;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color); /* Gold hover for links */
    text-decoration: none;
}

/* Footer buttons */
footer .btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

footer .btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--dark-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.social-icons a {
    color: #8b939e;
    margin-right: 1.25rem;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color); /* Gold hover for social icons */
    transform: translateY(-3px);
}

.copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2d3237;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Transition effect for page sections */
.transition-section {
    transition: all 0.5s ease;
}

/* Add padding to body to account for fixed navbar */
body {
    padding-top: 72px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .chat-window {
        margin-top: 2rem;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
}

/* Error message styling */
.message-received.error {
    background-color: #fff8f8;
    border-left: 3px solid #f44336;
    color: #d32f2f;
}

/* Typing indicator animation */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px !important;
    min-width: 40px;
    max-width: 80px !important;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: var(--primary-color); /* Gold dots for typing indicator */
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
}

.typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
}

.typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

/* Debug styles */
.debug-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.9); /* Black panel background */
    color: var(--primary-color); /* Gold text */
    font-family: monospace;
    padding: 10px;
    max-width: 400px;
    max-height: 200px;
    overflow: auto;
    z-index: 9999;
    border-top-left-radius: 5px;
    display: none;
}

.debug-panel.active {
    display: block;
}

/* Custom scrollbar for chat */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: var(--primary-color); /* Gold scrollbar */
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover); /* Darker gold on hover */
}

/* Network status indicator */
.network-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color); /* Gold for online */
    transition: background-color 0.3s ease;
}

.network-status.offline {
    background-color: #F44336; /* Red for offline */
}

/* Agent and Message Styling Enhancements */

/* Agent header styling */
.agent-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 2px solid var(--primary-color);
}

.agent-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Message content styling */
.message-content {
    width: 100%;
}

/* Message animation */
.message-animation {
    animation: messageAppear 0.3s ease-out forwards;
}

@keyframes messageAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Network status indicator */
.network-status {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50; /* Green for online */
    transition: background-color 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.network-status.offline {
    background-color: #F44336; /* Red for offline */
}

/* User form fade out animation */
.fade-out {
    animation: formFadeOut 0.3s forwards;
}

@keyframes formFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Enhanced message styling for formatted text */
.message-received .message-content {
    line-height: 1.5;
}

.message-received .message-content strong {
    color: #333;
    font-weight: 600;
}

.message-received .message-content em {
    color: #555;
}

.message-received .message-content br {
    margin-bottom: 4px;
}

/* User form enhancements */
.user-info-form {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
}

.user-info-form .form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #4a5568;
}

.user-info-form .form-control {
    height: 52px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid #edf2f7;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.user-info-form .form-control:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(74, 107, 255, 0.15);
}