/* ============================================
   AGENT CHAT INTERFACE STYLES
   ============================================ */

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: #F6F9FC;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Chat Header Bar */
.chat-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #002B7A 0%, #007BFF 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 43, 122, 0.2);
    z-index: 1000;
}

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

.back-to-overview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-to-overview:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-3px);
}

.back-to-overview i {
    font-size: 0.9rem;
}

.chat-header-center {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.boatey-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.boatey-logo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.chat-header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Main Chat Container */
.chat-main-container {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    background: white;
    box-shadow: 0 0 40px rgba(0, 43, 122, 0.1);
}

/* Chat Messages Area */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: linear-gradient(to bottom, #F6F9FC 0%, #FFFFFF 100%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-bubble {
    display: flex;
    gap: 1rem;
    animation: messageSlideIn 0.3s ease;
    max-width: 75%;
}

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

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.boatey-avatar-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.boatey-avatar-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.message-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-bubble-content {
    padding: 1rem 1.25rem;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 43, 122, 0.1);
}

.bot-message .message-bubble-content {
    background: white;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.user-message .message-bubble-content {
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.message-bubble-content p {
    margin: 0;
    line-height: 1.6;
    color: #002B7A;
    font-size: 1rem;
    white-space: pre-wrap;
}

.user-message .message-bubble-content p {
    color: white;
}

.message-timestamp {
    font-size: 0.75rem;
    color: #9CA3AF;
    padding-left: 0.5rem;
    font-weight: 500;
}

.user-message .message-timestamp {
    text-align: right;
    padding-right: 0.5rem;
    padding-left: 0;
}

/* Chat Input Area - Dropdown Menu */
.chat-input-area {
    padding: 2rem;
    background: white;
    border-top: 1px solid rgba(0, 123, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Suggestions Dropdown Wrapper */
.suggestions-dropdown-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.suggestions-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    font-family: 'Inter', sans-serif;
}

.suggestions-toggle-btn:hover {
    background: linear-gradient(135deg, #0088FF 0%, #003D99 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.suggestions-toggle-btn:active {
    transform: translateY(0);
}

.suggestions-toggle-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.suggestions-toggle-btn.active i {
    transform: rotate(180deg);
}

.suggestions-dropdown {
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 43, 122, 0.2);
    border: 1px solid rgba(0, 123, 255, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestions-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestions-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #F6F9FC;
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #002B7A;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    width: 100%;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #E8F4FD 0%, #D6EBF9 100%);
    border-color: #007BFF;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.suggestion-item i {
    color: #007BFF;
    font-size: 1.1rem;
    width: 20px;
    flex-shrink: 0;
}

.suggestion-item span {
    flex: 1;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 0.5rem 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9CA3AF;
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Agent Setup Screen */
.agent-setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 43, 122, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
}

.agent-setup-modal {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 43, 122, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s ease;
}

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

.setup-header {
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
    background: linear-gradient(135deg, #F6F9FC 0%, #FFFFFF 100%);
    border-radius: 24px 24px 0 0;
    position: relative;
}

.setup-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6B7280;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.setup-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    transform: scale(1.1);
}

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

.setup-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #002B7A;
    margin: 0 0 0.5rem;
}

.setup-header p {
    font-size: 1.1rem;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

.setup-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.setup-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setup-section label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #002B7A;
    margin-bottom: 0.5rem;
}

.setup-section input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    background: #F6F9FC;
    color: #002B7A;
    transition: all 0.3s ease;
    outline: none;
}

.setup-section input[type="text"]:focus {
    border-color: #007BFF;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.setup-section input[type="text"]::placeholder {
    color: #9CA3AF;
}

.avatar-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #F6F9FC;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.avatar-option:hover {
    border-color: #007BFF;
    background: linear-gradient(135deg, #E8F4FD 0%, #D6EBF9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.avatar-option.active {
    border-color: #007BFF;
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.avatar-option.active span {
    color: white;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.avatar-option.active .avatar-preview {
    background: white;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.avatar-preview i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.avatar-option.active .avatar-preview i {
    color: #007BFF;
}

.avatar-option span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #002B7A;
    transition: all 0.3s ease;
}

.agent-avatar-small {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.agent-avatar-small i {
    font-size: 1.2rem;
    color: white;
}

.agent-avatar-icon {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.agent-avatar-icon i {
    font-size: 1.2rem;
    color: white;
}

.personality-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.personality-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #F6F9FC;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.personality-option:hover {
    border-color: #007BFF;
    background: linear-gradient(135deg, #E8F4FD 0%, #D6EBF9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.personality-option.active {
    border-color: #007BFF;
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.personality-option.active i,
.personality-option.active span,
.personality-option.active p {
    color: white;
}

.personality-option i {
    font-size: 2rem;
    color: #007BFF;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.personality-option.active i {
    color: white;
    transform: scale(1.1);
}

.personality-option span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #002B7A;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.personality-option p {
    font-size: 0.85rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.setup-actions {
    padding: 1.5rem 2.5rem 2.5rem;
    border-top: 1px solid rgba(0, 123, 255, 0.1);
    display: flex;
    justify-content: center;
}

.setup-btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #007BFF 0%, #002B7A 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.setup-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0088FF 0%, #003D99 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.setup-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.setup-btn-primary:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .agent-setup-overlay {
        padding: 1rem;
    }
    
    .agent-setup-modal {
        max-height: 95vh;
    }
    
    .setup-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .setup-close-btn {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .setup-header h2 {
        font-size: 1.5rem;
        padding-right: 2.5rem;
    }
    
    .setup-header p {
        font-size: 1rem;
    }
    
    .setup-content {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .avatar-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .avatar-option {
        padding: 0.75rem 0.5rem;
    }
    
    .avatar-preview {
        width: 50px;
        height: 50px;
    }
    
    .avatar-preview i {
        font-size: 1.2rem;
    }
    
    .avatar-option span {
        font-size: 0.8rem;
    }
    
    .personality-options {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .personality-option {
        padding: 1.25rem 1rem;
    }
    
    .setup-actions {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .setup-btn-primary {
        width: 100%;
        padding: 1rem;
    }
    
    .chat-header-container {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .back-to-overview span {
        display: none;
    }
    
    .chat-header-title {
        font-size: 1.25rem;
    }
    
    .chat-main-container {
        margin-top: 70px;
        height: calc(100vh - 70px);
    }
    
    .chat-messages-area {
        padding: 1.5rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-input-area {
        padding: 1.5rem 1rem;
    }
    
    .suggestions-toggle-btn {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .suggestions-dropdown {
        max-height: 350px;
    }
    
    .suggestion-item {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

