/* ============================================
   DarChat EndUser Chat - Styles
   ============================================ */

:root {
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
}

body {
    font-family: 'Space Grotesk', sans-serif;
}

.chat-container {
    height: 100vh;
    max-height: 100vh;
}

.messages-container {
    height: calc(100vh - 180px);
}

.message-bubble {
    max-width: 80%;
    word-wrap: break-word;
}

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

.typing-indicator {
    animation: pulse 1.5s ease-in-out infinite;
}

/* OTP input boxes */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.otp-inputs input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: transparent;
}
.otp-inputs input:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.otp-inputs input.filled {
    border-color: var(--brand-500);
    background: var(--brand-50);
}

/* Step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: background 0.3s, transform 0.3s;
}
.step-dot.active {
    background: var(--brand-600);
    transform: scale(1.3);
}
.step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    transition: background 0.3s;
}
.step-line.active {
    background: var(--brand-600);
}

/* Resend timer */
.resend-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}
.resend-timer .countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--brand-700);
}

/* Toast */
.eu-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.eu-toast {
    padding: 10px 18px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: euSlideIn 0.3s ease;
    max-width: 320px;
}
.eu-toast-error { background: #dc2626; }
.eu-toast-success { background: #059669; }
.eu-toast-info { background: #2563eb; }

@keyframes euSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ========== Media & File Cards ========== */

.eu-media-card {
    max-width: 260px;
}

.eu-media-img {
    max-width: 260px;
    max-height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}
.eu-media-img:hover {
    opacity: 0.9;
}

.eu-media-video {
    max-width: 260px;
    max-height: 200px;
    border-radius: 8px;
}

.eu-media-audio {
    width: 240px;
    height: 40px;
}

.eu-file-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 260px;
}

/* For non-user file cards (white bg messages) */
.bg-white .eu-file-card {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.eu-file-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.eu-file-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eu-file-dl {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    transition: background 0.2s;
}
.eu-file-dl:hover {
    background: rgba(255, 255, 255, 0.35);
}
.bg-white .eu-file-dl {
    background: #e2e8f0;
    color: #475569;
}
.bg-white .eu-file-dl:hover {
    background: #cbd5e1;
}

/* Scrollbar */
.messages-container::-webkit-scrollbar {
    width: 5px;
}
.messages-container::-webkit-scrollbar-track {
    background: transparent;
}
.messages-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
