/**
 * Helios Super Chat - Public Styles v2.0
 * Black and Gold Theme with Mobile-First Design
 * Enhanced spacing, visibility, and professional appearance
 */

/* ========================================
   Floating Chat Icon
   ======================================== */
.hsc-chat-icon {
    position: fixed;
    bottom: 180px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #efdf9b 0%, #dcc87f 50%, #cdb048 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 200, 127, 0.5);
    transition: all 0.3s ease;
    z-index: 999999;
    color: #000;
}

.hsc-chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(220, 200, 127, 0.7);
}

.hsc-chat-icon svg {
    width: 32px;
    height: 32px;
}

/* ========================================
   Chat Modal
   ======================================== */
.hsc-chat-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000000;
    animation: hscSlideUp 0.3s ease-out;
}

.hsc-chat-modal.active {
    display: flex;
}

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

/* ========================================
   Chat Header - Enhanced for Mobile
   ======================================== */
.hsc-chat-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #dcc87f;
    flex-shrink: 0;
    min-height: 70px;
}

.hsc-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.hsc-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hsc-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #efdf9b, #dcc87f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 18px;
}

.hsc-header-title {
    color: #efdf9b;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.hsc-header-status {
    color: #6ee7b7;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hsc-header-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: hscPulse 2s infinite;
}

@keyframes hscPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Header Action Buttons */
.hsc-header-btn {
    background: transparent;
    border: none;
    color: #dcc87f;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.hsc-header-btn:hover {
    background: rgba(220, 200, 127, 0.1);
    transform: scale(1.1);
}

.hsc-header-btn svg {
    width: 20px;
    height: 20px;
}

#hsc-reset-chat:hover svg {
    animation: hscRotate 0.6s ease;
}

@keyframes hscRotate {
    to { transform: rotate(360deg); }
}

/* ========================================
   Chat Body - Fixed Scrolling
   ======================================== */
.hsc-chat-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: #0a0a0a;
    height: calc(600px - 70px - 70px - 50px);
    max-height: calc(100vh - 220px);
}

/* Custom Scrollbar */
.hsc-chat-body::-webkit-scrollbar {
    width: 6px;
}

.hsc-chat-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.hsc-chat-body::-webkit-scrollbar-thumb {
    background: #dcc87f;
    border-radius: 3px;
}

.hsc-chat-body::-webkit-scrollbar-thumb:hover {
    background: #cdb048;
}

/* ========================================
   Messages
   ======================================== */
.hsc-message {
    margin-bottom: 16px;
    animation: hscFadeIn 0.3s ease-out;
}

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

.hsc-message-bot .hsc-message-content {
    background: #2a2a2a;
    color: #e5e5e5;
    padding: 12px 16px;
    border-radius: 12px 12px 12px 4px;
    max-width: 85%;
    display: inline-block;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hsc-message-user .hsc-message-content {
    background: linear-gradient(135deg, #efdf9b, #dcc87f);
    color: #000;
    padding: 12px 16px;
    border-radius: 12px 12px 4px 12px;
    max-width: 85%;
    display: inline-block;
    margin-left: auto;
    line-height: 1.5;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 200, 127, 0.3);
}

.hsc-message-user {
    text-align: right;
}

/* Name Highlighting */
.hsc-name-highlight {
    background: linear-gradient(90deg, #a855f7, #ec4899, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: hscGradientShift 3s ease infinite;
}

@keyframes hscGradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

/* ========================================
   Options - Enhanced Spacing
   ======================================== */
.hsc-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.hsc-option-btn {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid #dcc87f;
    color: #dcc87f;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hsc-option-btn:hover {
    background: linear-gradient(135deg, #dcc87f, #cdb048);
    color: #000;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(220, 200, 127, 0.4);
}

/* ========================================
   Inline Forms - Enhanced
   ======================================== */
.hsc-inline-form {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    margin-top: 12px;
    border: 1px solid #3a3a3a;
}

.hsc-form-field {
    margin-bottom: 16px;
}

.hsc-form-label {
    display: block;
    color: #dcc87f;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsc-form-input,
.hsc-form-input[type="text"],
.hsc-form-input[type="date"],
.hsc-form-input[type="time"],
.hsc-form-input[type="number"],
textarea.hsc-form-input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hsc-form-input:focus,
textarea.hsc-form-input:focus {
    outline: none;
    border-color: #dcc87f;
    box-shadow: 0 0 0 3px rgba(220, 200, 127, 0.1);
}

.hsc-form-input::placeholder {
    color: #666;
}

.hsc-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.hsc-form-btn {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #efdf9b, #dcc87f);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsc-form-btn:hover {
    background: linear-gradient(135deg, #dcc87f, #cdb048);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 200, 127, 0.4);
}

.hsc-form-btn.secondary {
    background: transparent;
    border: 2px solid #dcc87f;
    color: #dcc87f;
}

.hsc-form-btn.secondary:hover {
    background: rgba(220, 200, 127, 0.1);
}

.hsc-form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
}

/* Location List */
.hsc-location-item {
    background: #1a1a1a;
    padding: 10px 14px;
    border-radius: 6px;
    color: #4ade80;
    font-size: 13px;
    margin-bottom: 8px;
    border-left: 3px solid #4ade80;
}

/* ========================================
   Car Selection Cards
   ======================================== */
.hsc-car-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.hsc-car-card {
    background: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.hsc-car-card:hover {
    border-color: #dcc87f;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(220, 200, 127, 0.2);
}

.hsc-car-card.selected {
    border-color: #dcc87f;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    box-shadow: 0 0 0 3px rgba(220, 200, 127, 0.2);
}

.hsc-car-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.hsc-car-name {
    color: #dcc87f;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}

.hsc-car-price {
    color: #999;
    font-size: 13px;
}

/* ========================================
   Summary Cards - Improved Visibility
   ======================================== */
.hsc-summary-card {
    background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
    border: 1px solid #dcc87f;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hsc-summary-title {
    color: #dcc87f;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #3a3a3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.hsc-summary-row:last-child {
    border-bottom: none;
}

.hsc-summary-label {
    color: #999;
    font-size: 14px;
}

.hsc-summary-value {
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 600;
}

.hsc-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 12px;
    border-top: 2px solid #dcc87f;
}

.hsc-summary-total .hsc-summary-label {
    color: #dcc87f;
    font-size: 16px;
    font-weight: 700;
}

.hsc-summary-total .hsc-summary-value {
    color: #dcc87f;
    font-size: 20px;
    font-weight: 700;
}

.hsc-summary-note {
    background: rgba(220, 200, 127, 0.1);
    padding: 12px;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
}

.hsc-summary-note p {
    margin: 6px 0;
}

.hsc-summary-note strong {
    color: #dcc87f;
}

/* Cost Card */
.hsc-cost-card {
    border-color: #4ade80;
}

.hsc-cost-card .hsc-summary-title {
    color: #4ade80;
    border-bottom-color: #4ade80;
}

/* Terms Card */
.hsc-terms-card {
    border-color: #60a5fa;
}

.hsc-terms-card .hsc-summary-title {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

/* Confirmation Card */
.hsc-confirmation-card {
    border-color: #4ade80;
    background: linear-gradient(135deg, #1a3a1a, #1a2a1a);
}

.hsc-confirmation-card .hsc-summary-title {
    color: #4ade80;
    border-bottom-color: #4ade80;
}

/* ========================================
   Chat Input
   ======================================== */
.hsc-chat-input-container {
    padding: 16px 20px;
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.hsc-chat-input {
    flex: 1;
    padding: 12px 16px;
    background: #0a0a0a;
    border: 2px solid #2a2a2a;
    border-radius: 24px;
    color: #e5e5e5;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hsc-chat-input:focus {
    outline: none;
    border-color: #dcc87f;
}

.hsc-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #efdf9b, #dcc87f);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hsc-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 200, 127, 0.4);
}

.hsc-send-btn svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Progress Bar
   ======================================== */
.hsc-progress-container {
    padding: 12px 20px;
    background: #0a0a0a;
    border-top: 1px solid #2a2a2a;
    display: none;
    flex-shrink: 0;
}

.hsc-progress-container.active {
    display: block;
}

.hsc-progress-bar {
    width: 100%;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.hsc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #efdf9b, #dcc87f, #cdb048);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.hsc-progress-text {
    color: #dcc87f;
    font-size: 11px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .hsc-chat-icon {
        bottom: 100px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .hsc-chat-modal {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .hsc-chat-header {
        padding: 20px 16px;
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .hsc-chat-body {
        min-height: auto;
        max-height: none;
        padding: 16px;
    }
    
    .hsc-car-cards {
        grid-template-columns: 1fr;
    }
    
    .hsc-options {
        gap: 10px;
    }
    
    .hsc-option-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.hsc-typing-indicator {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: #2a2a2a;
    border-radius: 12px;
    width: fit-content;
}

.hsc-typing-dot {
    width: 8px;
    height: 8px;
    background: #dcc87f;
    border-radius: 50%;
    animation: hscTyping 1.4s infinite;
}

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

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

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