/* Doctor Chat Widget - Modern Frontend Styles */

/* Load Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.dcw-widget {
    --dcw-primary: #0073aa;
    --dcw-secondary: #28a745;
    --dcw-primary-dark: #005a87;
    --dcw-primary-light: #e6f3ff;
    --dcw-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dcw-gradient-secondary: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --dcw-gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dcw-shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --dcw-shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --dcw-shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
    --dcw-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --dcw-font-size: 14px;
    --dcw-button-size: 56px;
    --dcw-radius: 14px;
    --dcw-radius-sm: 10px;
    font-family: var(--dcw-font-family);
    font-size: var(--dcw-font-size);
    font-weight: 400;
    line-height: 1.5;
    z-index: 999999;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Position Classes */
.dcw-widget.dcw-position-bottom-right {
    position: fixed;
    bottom: 24px;
    right: 24px;
}

.dcw-widget.dcw-position-bottom-left {
    position: fixed;
    bottom: 24px;
    left: 24px;
}

.dcw-widget.dcw-position-top-right {
    position: fixed;
    top: 24px;
    right: 24px;
}

.dcw-widget.dcw-position-top-left {
    position: fixed;
    top: 24px;
    left: 24px;
}

/* ===== TOGGLE BUTTON ===== */
.dcw-toggle {
    width: var(--dcw-button-size);
    height: var(--dcw-button-size);
    border-radius: 50%;
    background: var(--dcw-gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
    position: relative;
    animation: dcw-float 3s ease-in-out infinite;
}

.dcw-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--dcw-gradient-primary);
    animation: dcw-pulse-ring 2s infinite;
    z-index: -1;
}

@keyframes dcw-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes dcw-pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.dcw-toggle:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.6);
    animation: none;
}

.dcw-toggle:hover::before {
    animation: none;
    opacity: 0;
}

.dcw-toggle.dcw-open {
    animation: none;
    transform: rotate(180deg);
}

.dcw-toggle.dcw-open::before {
    animation: none;
    opacity: 0;
}

.dcw-no-pulse .dcw-toggle {
    animation: none;
}

.dcw-no-pulse .dcw-toggle::before {
    animation: none;
    opacity: 0;
}

.dcw-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.dcw-toggle-icon svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ===== CHAT WINDOW ===== */
.dcw-window {
    position: absolute;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 560px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dcw-slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.dcw-position-bottom-right .dcw-window,
.dcw-position-bottom-left .dcw-window {
    bottom: 80px;
}

.dcw-position-top-right .dcw-window,
.dcw-position-top-left .dcw-window {
    top: 80px;
}

.dcw-position-bottom-right .dcw-window,
.dcw-position-top-right .dcw-window {
    right: 0;
}

.dcw-position-bottom-left .dcw-window,
.dcw-position-top-left .dcw-window {
    left: 0;
}

/* ===== HEADER ===== */
.dcw-header {
    background: var(--dcw-gradient-primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.dcw-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.dcw-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.dcw-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.3);
}

.dcw-avatar svg {
    width: 20px;
    height: 20px;
    opacity: 0.95;
}

.dcw-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dcw-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.dcw-status-online {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
}

.dcw-status-online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #4ade80;
    animation: dcw-status-pulse 2s infinite;
}

@keyframes dcw-status-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #4ade80; }
    50% { opacity: 0.7; box-shadow: 0 0 15px #4ade80; }
}

.dcw-call-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

.dcw-call-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.08);
}

.dcw-call-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== CLINIC INTRODUCTION ===== */
.dcw-clinic-intro {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: var(--dcw-radius-sm);
    padding: 16px 18px;
    margin: 16px;
    margin-bottom: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: #0c4a6e;
    font-weight: 500;
    box-shadow: var(--dcw-shadow-sm);
}

.dcw-clinic-intro strong {
    color: #0369a1;
    font-weight: 700;
}

/* ===== LANGUAGE SELECTION ===== */
.dcw-language-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    overflow-y: auto;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.dcw-language-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.dcw-language-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 280px;
}

.dcw-lang-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    border: 2px solid #e2e8f0;
    border-radius: var(--dcw-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--dcw-shadow-sm);
}

.dcw-lang-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.dcw-lang-btn:active {
    transform: translateY(-1px);
}

.dcw-lang-flag {
    font-size: 24px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.dcw-lang-name {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
}

/* ===== RTL SUPPORT ===== */
.dcw-messages[dir="rtl"],
.dcw-input[dir="rtl"],
.dcw-contact-form[dir="rtl"] {
    text-align: right;
}

.dcw-messages[dir="rtl"] .dcw-message-bot {
    align-items: flex-end;
}

.dcw-messages[dir="rtl"] .dcw-message-user {
    align-items: flex-start;
}

.dcw-messages[dir="rtl"] .dcw-message-bot .dcw-message-bubble {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 6px;
}

.dcw-messages[dir="rtl"] .dcw-message-user .dcw-message-bubble {
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 6px;
}

/* ===== MESSAGES AREA ===== */
.dcw-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.dcw-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: dcw-messageIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dcw-messageIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dcw-message-bot {
    align-items: flex-start;
}

.dcw-message-user {
    align-items: flex-end;
}

.dcw-message-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    position: relative;
}

.dcw-message-bot .dcw-message-bubble {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dcw-message-user .dcw-message-bubble {
    background: var(--dcw-gradient-primary);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.dcw-message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    padding: 0 6px;
    font-weight: 500;
}

/* ===== ADMIN MESSAGES ===== */
.dcw-message-admin {
    align-items: flex-start;
}

.dcw-message-admin .dcw-message-bubble {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.dcw-message-admin .dcw-message-bubble::before {
    content: '👨‍⚕️ Asistan';
    display: block;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.9;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

/* ===== SYSTEM MESSAGES ===== */
.dcw-message-system {
    align-items: center;
}

.dcw-message-system .dcw-message-bubble {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: 10px;
    font-size: 13px;
    max-width: 100%;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

/* ===== ADMIN JOINED BANNER ===== */
.dcw-admin-banner {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 2px solid #6ee7b7;
    letter-spacing: -0.2px;
}

.dcw-live-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: dcw-live-pulse 1.5s infinite;
    box-shadow: 0 0 10px #10b981;
}

@keyframes dcw-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* ===== TYPING INDICATOR ===== */
.dcw-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    width: fit-content;
    box-shadow: var(--dcw-shadow-sm);
}

.dcw-typing span {
    width: 9px;
    height: 9px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: dcw-typing 1.4s infinite;
}

.dcw-typing span:nth-child(2) { animation-delay: 0.2s; }
.dcw-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dcw-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* ===== TERMS SECTION ===== */
.dcw-terms-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.dcw-terms-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.12);
    max-width: 280px;
    width: 100%;
}

.dcw-terms-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: #fff;
}

.dcw-terms-icon svg {
    width: 24px;
    height: 24px;
}

.dcw-terms-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.dcw-terms-text {
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.dcw-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.dcw-terms-checkbox:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.dcw-terms-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
    margin-top: 1px;
}

.dcw-terms-checkbox label {
    font-size: 12px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}

.dcw-terms-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

.dcw-terms-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.dcw-terms-btn:disabled {
    background: #d1d5db;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.dcw-terms-btn.dcw-loading {
    pointer-events: none;
    opacity: 0.8;
}

.dcw-terms-btn.dcw-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dcwSpin 0.8s linear infinite;
    margin-left: 8px;
}

/* ===== CONTACT FORM ===== */
.dcw-contact-form {
    padding: 24px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
}

.dcw-contact-form h4 {
    margin: 0 0 18px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.dcw-form-group {
    margin-bottom: 14px;
}

.dcw-form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--dcw-radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s;
    box-sizing: border-box;
    background: #fff;
}

.dcw-form-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.dcw-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.dcw-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--dcw-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.3s;
    box-sizing: border-box;
    background: #fff;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.dcw-form-group textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.dcw-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.dcw-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.dcw-form-half {
    flex: 1;
    margin-bottom: 0;
}

.dcw-form-half input {
    padding: 12px 14px;
    font-size: 14px;
}

.dcw-submit-contact {
    width: 100%;
    padding: 16px;
    background: var(--dcw-gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--dcw-radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    letter-spacing: -0.2px;
}

.dcw-submit-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

.dcw-submit-contact:active {
    transform: translateY(0);
}

/* ===== INPUT AREA ===== */
.dcw-input-area {
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.dcw-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dcw-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 400;
    color: #1e293b;
    outline: none;
    transition: all 0.3s;
    background: #f8fafc;
}

.dcw-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.dcw-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.dcw-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dcw-gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.dcw-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.dcw-send:active {
    transform: scale(1);
}

.dcw-send svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* ===== EMERGENCY BUTTON ===== */
.dcw-emergency {
    padding: 16px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.dcw-emergency-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: #fff;
    color: #dc2626;
    text-decoration: none;
    border-radius: var(--dcw-radius-sm);
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: var(--dcw-shadow-sm);
}

.dcw-emergency-btn:hover {
    background: #fef2f2;
    transform: translateY(-2px);
    box-shadow: var(--dcw-shadow-md);
}

.dcw-emergency-btn svg {
    width: 22px;
    height: 22px;
}

/* ===== SCROLLBAR ===== */
.dcw-messages::-webkit-scrollbar {
    width: 6px;
}

.dcw-messages::-webkit-scrollbar-track {
    background: transparent;
}

.dcw-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dcw-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== CAPTCHA SECTION ===== */
.dcw-spam-check {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.dcw-captcha-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: var(--dcw-shadow-md);
    max-width: 280px;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.dcw-captcha-icon {
    width: 50px;
    height: 50px;
    background: var(--dcw-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dcw-captcha-icon svg {
    width: 24px;
    height: 24px;
}

.dcw-captcha-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.dcw-captcha-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 16px 0;
    font-weight: 400;
}

.dcw-captcha-question {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.dcw-math-question {
    font-size: 22px;
    font-weight: 700;
    background: var(--dcw-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.dcw-captcha-input-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dcw-captcha-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.3s;
    color: #1e293b;
    -moz-appearance: textfield;
}

.dcw-captcha-input::-webkit-outer-spin-button,
.dcw-captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dcw-captcha-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.dcw-captcha-submit {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: var(--dcw-gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.dcw-captcha-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dcw-captcha-submit svg {
    width: 20px;
    height: 20px;
}

.dcw-captcha-error {
    color: #dc2626;
    font-size: 12px;
    margin: 10px 0 0 0;
    font-weight: 500;
}

/* ===== ANIMATIONS ===== */
@keyframes dcw-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.dcw-shake {
    animation: dcw-shake 0.5s ease-in-out;
}

/* Loading state */
.dcw-lang-btn.dcw-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.dcw-lang-btn.dcw-loading * {
    visibility: hidden;
}

.dcw-lang-btn.dcw-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: dcw-spin 0.8s linear infinite;
}

@keyframes dcw-spin {
    to { transform: rotate(360deg); }
}

.dcw-lang-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== TABLET RESPONSIVE ===== */
@media (max-width: 768px) {
    .dcw-window {
        width: 360px;
        max-width: calc(100vw - 32px);
        height: 520px;
        max-height: calc(100vh - 120px);
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
    .dcw-widget.dcw-position-bottom-right,
    .dcw-widget.dcw-position-bottom-left,
    .dcw-widget.dcw-position-top-right,
    .dcw-widget.dcw-position-top-left {
        bottom: 12px !important;
        right: 12px !important;
        left: auto !important;
        top: auto !important;
    }

    .dcw-toggle {
        width: 52px;
        height: 52px;
    }

    .dcw-toggle-icon svg {
        width: 24px;
        height: 24px;
    }

    .dcw-window {
        position: fixed !important;
        width: calc(100vw - 24px) !important;
        height: calc(100vh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        bottom: 72px !important;
        right: 12px !important;
        left: 12px !important;
        top: auto !important;
        border-radius: 18px;
    }

    .dcw-position-bottom-right .dcw-window,
    .dcw-position-bottom-left .dcw-window,
    .dcw-position-top-right .dcw-window,
    .dcw-position-top-left .dcw-window {
        bottom: 72px !important;
        right: 12px !important;
        left: 12px !important;
        top: auto !important;
    }

    .dcw-header {
        padding: 16px 18px;
    }

    .dcw-avatar {
        width: 42px;
        height: 42px;
    }

    .dcw-avatar svg {
        width: 22px;
        height: 22px;
    }

    .dcw-header-info {
        gap: 12px;
    }

    .dcw-name {
        font-size: 15px;
    }

    .dcw-status-online {
        font-size: 12px;
    }

    .dcw-call-btn {
        width: 40px;
        height: 40px;
    }

    .dcw-call-btn svg {
        width: 18px;
        height: 18px;
    }

    .dcw-clinic-intro {
        margin: 12px;
        padding: 14px 16px;
        font-size: 13px;
    }

    .dcw-language-select {
        padding: 20px 16px;
    }

    .dcw-language-title {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .dcw-language-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 280px;
    }

    .dcw-lang-btn {
        padding: 14px 10px;
        flex-direction: column;
        gap: 6px;
    }

    .dcw-lang-flag {
        font-size: 26px;
    }

    .dcw-lang-name {
        font-size: 12px;
    }

    .dcw-messages {
        padding: 16px;
    }

    .dcw-message {
        margin-bottom: 14px;
    }

    .dcw-message-bubble {
        max-width: 90%;
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 16px;
    }

    .dcw-message-bot .dcw-message-bubble {
        border-bottom-left-radius: 4px;
    }

    .dcw-message-user .dcw-message-bubble {
        border-bottom-right-radius: 4px;
    }

    .dcw-message-time {
        font-size: 10px;
    }

    .dcw-typing {
        padding: 12px 14px;
        border-radius: 16px;
    }

    .dcw-typing span {
        width: 8px;
        height: 8px;
    }

    .dcw-input-area {
        padding: 14px 16px;
    }

    .dcw-form {
        gap: 10px;
    }

    .dcw-input {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 20px;
    }

    .dcw-send {
        width: 44px;
        height: 44px;
    }

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

    .dcw-contact-form {
        padding: 20px 16px;
    }

    .dcw-contact-form h4 {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .dcw-form-group {
        margin-bottom: 12px;
    }

    .dcw-form-group input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .dcw-submit-contact {
        padding: 14px;
        font-size: 14px;
    }

    .dcw-emergency {
        padding: 14px 16px;
    }

    .dcw-emergency-btn {
        padding: 14px;
        font-size: 14px;
    }

    .dcw-admin-banner {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Captcha Mobile */
    .dcw-spam-check {
        padding: 20px 16px;
    }

    .dcw-captcha-box {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .dcw-captcha-icon {
        width: 60px;
        height: 60px;
    }

    .dcw-captcha-icon svg {
        width: 30px;
        height: 30px;
    }

    .dcw-captcha-title {
        font-size: 16px;
    }

    .dcw-captcha-subtitle {
        font-size: 13px;
    }

    .dcw-math-question {
        font-size: 24px;
    }

    .dcw-captcha-input {
        padding: 14px 16px;
        font-size: 18px;
    }

    .dcw-captcha-submit {
        width: 50px;
        height: 50px;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 360px) {
    .dcw-widget.dcw-position-bottom-right,
    .dcw-widget.dcw-position-bottom-left {
        bottom: 8px !important;
        right: 8px !important;
    }

    .dcw-toggle {
        width: 48px;
        height: 48px;
    }

    .dcw-window {
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 70px) !important;
        bottom: 64px !important;
        right: 8px !important;
        left: 8px !important;
        border-radius: 14px;
    }

    .dcw-language-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dcw-lang-btn {
        padding: 12px 8px;
    }

    .dcw-lang-flag {
        font-size: 22px;
    }

    .dcw-lang-name {
        font-size: 11px;
    }

    .dcw-message-bubble {
        max-width: 92%;
        font-size: 13px;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
*, *::before, *::after {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
