/* =====================================================
   CLASSIFIED - Overlay Screens
   Auth, chat, settings, profile, and all overlays
   ===================================================== */

/* =====================================================
   Base Overlay Styles
   ===================================================== */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: var(--z-overlay-base);
    display: none;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
    padding-top: var(--header-height);
    box-sizing: border-box;
}

.overlay-screen.show {
    display: flex;
}

/* Prevent body scroll when overlay is open */
body.overlay-open {
    overflow: hidden;
}

body.form-overlay-open {
    -webkit-overflow-scrolling: touch;
}

/* Specific z-index for each overlay type */
#businessChat.overlay-screen {
    z-index: 400 !important;
    padding-top: 0 !important;
}

#userProfileView.overlay-screen,
#myProfileView.overlay-screen {
    z-index: var(--z-overlay-profile); /* Now 420 - above chats */
}

#businessProfile.overlay-screen {
    z-index: var(--z-business-profile); /* Now 425 - above chats */
}

#profileEditor.overlay-screen,
#businessProfileEditor.overlay-screen {
    z-index: var(--z-profile-editor);
}

#profileEditor.overlay-screen,
#businessProfileEditor.overlay-screen {
    z-index: var(--z-profile-editor);
}

#settingsOverlay.overlay-screen {
    z-index: var(--z-settings);
    padding-top: calc(var(--header-height) + 16px) !important;
}

#individualChat.overlay-screen {
    z-index: var(--z-overlay-chat);
    padding-top: 0 !important;
}

#individualChat[data-chat-type="business"] {
    z-index: var(--z-overlay-business-chat);
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(100%); }
    to { transform: translateX(-50%) translateY(0); }
}

/* =====================================================
   Auth Screens
   ===================================================== */
.auth-screen {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d2d2d 100%);
    z-index: var(--z-auth-portal);
    display: none;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow-y: auto;
    padding-bottom: 100px;
}

.auth-screen.show {
    display: flex;
}

.auth-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.auth-logo {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-gold), #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.auth-tagline {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 40px;
}

.auth-form {
    padding: 0 30px;
    flex: 1;
}

.auth-switch {
    text-align: center;
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.auth-switch a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.business-auth-form {
    display: none;
    padding: 0 30px;
}

.business-auth-form.active {
    display: block;
}

/* =====================================================
   Settings Overlay
   ===================================================== */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
}

.settings-section {
    margin-bottom: 30px;
    padding: 0 20px;
}

.settings-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: var(--spacing-lg);
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-circle);
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-medium);
}

.user-details {
    flex: 1;
}

.user-details .user-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-details .user-email {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    background: #4CAF50;
}

.settings-actions {
    display: flex;
    gap: 12px;
}

.settings-btn-primary,
.settings-btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
    color: white;
}

.settings-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,212,255,0.3);
}

.settings-btn-secondary {
    background: var(--border-light);
    color: white;
    border: 1px solid var(--border-medium);
}

.settings-btn-secondary:hover {
    background: var(--border-medium);
}

.settings-list {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    background: none;
    border: none;
    color: white;
    width: 100%;
    text-align: left;
    cursor: default;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-clickable {
    cursor: pointer;
    transition: background 0.3s ease;
}

.settings-clickable:hover {
    background: rgba(255,255,255,0.05);
}

.settings-item-info {
    flex: 1;
}

.settings-item-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.settings-item-subtitle {
    font-size: 13px;
    opacity: 0.7;
}

.settings-arrow {
    color: rgba(255,255,255,0.5);
    font-size: 18px;
}

.settings-footer {
    text-align: center;
    padding: 30px 20px 20px;
    opacity: 0.5;
}

.app-version {
    font-size: 14px;
    margin-bottom: 5px;
}

.app-copyright {
    font-size: 12px;
}

.settings-logout-section {
    padding: var(--spacing-lg);
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
}

.logout-btn {
    width: 100%;
    background: rgba(255,107,107,0.2);
    border: 1px solid rgba(255,107,107,0.3);
    color: #FF6B6B;
    padding: var(--spacing-md);
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,107,107,0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.2);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-medium);
    transition: .4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: var(--radius-circle);
}

input:checked + .toggle-slider {
    background-color: var(--accent-cyan);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   Profile Editor Overlay
   ===================================================== */
.profile-editor {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.profile-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-cyan);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.9;
}

.form-input {
    width: 100%;
    background: var(--border-light);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: white;
    font-size: 14px;
}

.form-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    width: 100%;
    background: var(--border-light);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: white;
    font-size: 14px;
}

.form-select option {
    background: #2a2a2a;
    color: white;
}

.choice-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.choice-btn {
    background: var(--border-light);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.choice-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
    border-color: var(--accent-cyan);
}

.choice-btn:hover:not(.active) {
    background: var(--border-medium);
}

.profile-type {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.toggle-row {
    display: flex;
    gap: 12px;
}

.toggle-row .choice-btn {
    flex: 1;
}

/* =====================================================
   Business Dashboard Overlay
   ===================================================== */
#businessDashboard {
    background: var(--bg-dark, #1a1a1a);
}

#businessDashboard.show {
    display: flex !important;
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
    background: var(--bg-dark, #1a1a1a);
}

.business-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    margin: var(--spacing-lg);
}

.business-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.business-header-info {
    display: flex;
    flex-direction: column;
}

.greeting {
    font-size: var(--text-sm);
    opacity: 0.7;
    margin-bottom: 4px;
}

.business-name {
    font-size: 20px;
    font-weight: 700;
}

.notification-bell {
    position: relative;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: var(--radius-circle);
    animation: pulse 1.5s infinite;
}

.status-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: 0 var(--spacing-lg) var(--spacing-lg);
}

.status-info {
    flex: 1;
}

.status-title {
    font-size: var(--text-sm);
    opacity: 0.7;
    margin-bottom: 4px;
}

.status-message {
    font-size: 16px;
    font-weight: 600;
}

.match-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

/* =====================================================
   Chat Overlay
   ===================================================== */
.chat-header {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    background-size: cover;
    background-position: center;
    margin: 0 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-header-avatar:hover {
    transform: scale(1.05);
}

.chat-header-info {
    flex: 1;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.chat-header-info:hover {
    background: var(--border-light);
}

.chat-header-info:hover .chat-header-name {
    color: var(--accent-cyan);
}

.chat-header-name {
    font-weight: 600;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.chat-status {
    font-size: 12px;
    opacity: 0.7;
}

.chat-messages {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
    animation: messageAppear 0.3s ease;
    width: 100%;
}

.message.received {
    justify-content: flex-start; /* Customer messages LEFT */
}

.message.sent {
    justify-content: flex-end; /* Business replies RIGHT */
}

.message.received .message-text {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px 18px 18px 4px;
    padding: 10px 14px;
    max-width: 70%;
    word-wrap: break-word;
}

.message.sent .message-text {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 18px 18px 4px 18px;
    padding: 10px 14px;
    max-width: 70%;
    word-wrap: break-word;
    color: white;
}

.message.sent {
    justify-content: flex-end;
}

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

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.received .message-bubble {
    background: var(--border-light);
    color: white;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
    color: white;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

.message.sent .message-time {
    text-align: right;
}

.message.received .message-time {
    text-align: left;
}

.promo-message-card {
    background: linear-gradient(135deg, #FF6B6B, #FF8C42);
    border-radius: 15px;
    padding: 15px;
    margin: 10px 0;
    max-width: 250px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.promo-message-card:active {
    transform: translateY(0);
}

.chat-input {
    display: flex;
    padding: var(--spacing-lg);
    background: rgba(0,0,0,0.95);
    border-top: 1px solid var(--border-light);
}

.chat-input input {
    flex: 1;
    background: var(--border-light);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: 12px 20px;
    color: white;
    margin-right: 10px;
}

.chat-input input::placeholder {
    color: rgba(255,255,255,0.5);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

/* =====================================================
   Business Chat Overlay
   ===================================================== */
.business-badge {
    background: rgba(74, 158, 255, 0.2);
    color: #4A9EFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
}

#businessChat #businessChatAvatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

#businessChatEmptyState {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

#businessChatEmptyState .empty-icon {
    font-size: 50px;
    margin-bottom: 12px;
    opacity: 0.6;
}

#businessChatEmptyState .empty-title {
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 6px;
}

#businessChatEmptyState .empty-text {
    color: #999;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.quick-questions-container {
    width: 100%;
    max-width: 280px;
}

.quick-questions-label {
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
    text-align: left;
}

.quick-question-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 8px;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.quick-question-btn:hover {
    background: #3a3a3a;
    border-color: #00d4ff;
    transform: translateX(5px);
}

#businessChat .chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    padding: 12px 15px 30px;
    border-top: 1px solid #2a2a2a;
    z-index: 10;
    display: flex;
    align-items: center;
}

#businessChat .chat-input {
    background: var(--border-light);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: 12px 20px;
    color: white !important;
    font-size: 14px;
    width: calc(100% - 60px);
    margin-right: 10px;
}

#businessChat .chat-input::placeholder {
    color: rgba(255,255,255,0.5);
}

#businessChat .chat-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

#businessChat .send-btn {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-cyan-dark));
    border: none;
    border-radius: var(--radius-circle);
    width: 45px;
    height: 45px;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s ease;
}

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

#businessChat .chat-messages {
    padding-bottom: 180px; /* 🔧 FIX: Add more space for quick replies bar */
    overflow-y: auto;
}

/* =====================================================
   Business Messages Overlay
   ===================================================== */
.business-messages-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    background: var(--bg-dark);
}

.message-filters {
    display: flex;
    gap: 12px;
    padding: var(--spacing-lg) var(--spacing-lg) 0;
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    scrollbar-width: none;
}

.message-filters::-webkit-scrollbar {
    display: none;
}

.business-conversations {
    padding: 0 var(--spacing-lg);
}

.customer-name {
    font-weight: 600;
    color: white;
}

/* =====================================================
   Business Messages Inbox - Direct from Mockup (Dark Theme)
   ===================================================== */

/* Status Bar - Exact from mockup */
.messages-status-bar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item {
    text-align: center;
}

.status-number {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}

.status-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Message Tabs - Exact from mockup */
.message-filters {
    display: flex;
    padding: 10px 20px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message-filters {
    position: relative; /* Allow badges to overflow */
}

.message-filters .filter-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    overflow: visible; /* 🔧 FIX: Allow badge to overflow */
}

.message-filters .filter-btn.active {
    background: #3b82f6;
    color: white;
}

.filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 12px;
    font-weight: bold;
    display: none;
    z-index: 10; /* 🔧 FIX: Ensure badge appears above everything */
    border: 2px solid var(--bg-dark); /* 🔧 FIX: Visible border */
    min-width: 20px;
    text-align: center;
}

.filter-badge.show {
    display: block;
}

/* Conversations List - Exact from mockup */
.business-conversations {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-dark);
}

.business-conversations .message-item {
    display: flex;
    padding: 15px 20px;
    padding-left: 20px; /* 🔧 FIX: Reset to standard padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    border-radius: 0; /* 🔧 FIX: Square corners */
    margin: 0; /* 🔧 FIX: Full width */
}

.business-conversations .message-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.business-conversations .message-item.unread {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6; /* 🔧 FIX: Full width, square border */
    padding-left: 16px; /* 🔧 FIX: Compensate for border */
    border-radius: 0; /* 🔧 FIX: Square corners */
}

.business-conversations .customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.business-conversations .message-content {
    flex: 1;
    min-width: 0;
}

.business-conversations .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.business-conversations .customer-name {
    font-weight: 600;
    font-size: 15px;
    color: white;
}

.business-conversations .message-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.business-conversations .message-preview {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 🔧 FIX: Unread badge positioning - top right corner */
.business-conversations .unread-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    z-index: 5;
    border: 2px solid var(--bg-dark);
}


.message-tags {
    display: flex;
    gap: 5px;
    margin-top: 6px;
}

.message-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.message-tag.inquiry {
    background: #dbeafe;
    color: #3b82f6;
}

.message-tag.booking {
    background: #d1fae5;
    color: #10b981;
}

.message-tag.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.message-tag.confirmed {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* =====================================================
   Business Chat Quick Replies (Chat Window Only)
   ===================================================== */

.chat-quick-reply-bar {
    position: absolute;
    bottom: 85px;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: rgba(26, 26, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9;
    overflow: visible; /* 🔧 FIX: Allow child to scroll */
}

.quick-reply-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}


.quick-replies {
    display: flex;
    gap: 10px;
    overflow-x: scroll; /* 🔧 FIX: Enable horizontal scrolling */
    overflow-y: hidden;
    flex-wrap: nowrap; /* 🔧 FIX: Force single row */
    scrollbar-width: none; /* Firefox - hide scrollbar */
    -ms-overflow-style: none; /* IE/Edge - hide scrollbar */
    padding-bottom: 5px; /* Small padding to prevent cutting off */
}

.quick-replies::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera - hide scrollbar */
    width: 0 !important;
    height: 0 !important;
}

.quick-reply-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0; /* 🔧 FIX: Prevent buttons from shrinking */
    min-width: fit-content; /* 🔧 FIX: Maintain button width */
}

.quick-reply-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* =====================================================
   Photo Viewer Overlay
   ===================================================== */
.photo-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-viewer-overlay.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.photo-viewer-header {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 10;
}

.photo-counter {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: white;
}

.photo-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.photo-viewer-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.photo-swiper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.photo-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-viewer-content::before,
.photo-viewer-content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 5;
}

.photo-viewer-content::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
}

.photo-viewer-content::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
}
