/* =============================================
   DSC Chatbox — style.css  v3.2
   Site: indiandsc.com
   ============================================= */

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

/* ── Container ─────────────────────────────── */
#chatbox {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: auto;
    width: 330px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.07),
        0 16px 48px rgba(0,0,0,0.18),
        0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 9999;                   /* lower than tawk.to's default ~10000000 */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    transition: all 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ── Minimised pill ────────────────────────── */
#chatbox.chatbox-minimized {
    width: 195px;
    height: 50px;
    border-radius: 30px;
    cursor: pointer;
}

#chatbox.chatbox-minimized #chatbox-content {
    display: none;
}

/* ── Header ────────────────────────────────── */
#chatbox-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    color: #fff;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    height: 50px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

#chatbox-header::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 90px; height: 90px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

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

.cb-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
}

.cb-status {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cb-dot {
    height: 7px;
    width: 7px;
    background: #4ade80;
    border-radius: 50%;
    flex-shrink: 0;
    animation: cb-pulse 2s ease-in-out infinite;
}

@keyframes cb-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
    50%       { box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

.cb-toggle-icon {
    font-size: 17px;
    opacity: 0.9;
}

/* ── Close (×) button ──────────────────────── */
#minimize-btn {
    position: absolute;
    top: 13px;
    right: 14px;
    color: rgba(255,255,255,0.4);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
    z-index: 2;
}
#minimize-btn:hover { color: #fff; }

/* ── Options content area ──────────────────── */
#chatbox-view-options {
    padding: 18px 16px 20px;
    background: #f4f6fb;
}

/* ── Message bubble ────────────────────────── */
.cb-message-bubble {
    background: #ffffff;
    border: 1px solid #e8ecf4;
    padding: 14px 15px;
    border-radius: 12px;
    border-bottom-left-radius: 3px;
    margin-bottom: 15px;
    color: #374151;
    line-height: 1.6;
    font-size: 13.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cb-message-bubble p { margin: 0 0 6px; }
.cb-message-bubble p:last-child { margin-bottom: 0; }

.cb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1e3a5f;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 9px;
    text-transform: uppercase;
}

/* ── Action buttons ────────────────────────── */
.cb-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 9px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    transition: transform 0.18s, box-shadow 0.18s;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}
.cb-btn:hover { transform: translateY(-1px); }

.cb-btn-whatsapp {
    background: #25D366;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(37,211,102,0.35);
}
.cb-btn-whatsapp:hover { box-shadow: 0 5px 16px rgba(37,211,102,0.45); }

.cb-btn-form {
    background: #ffffff;
    color: #1e3a5f;
    border: 1.5px solid #d1d9e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cb-btn-form:hover {
    border-color: #1e3a5f;
    background: #f0f4ff;
}

/* ── Form view ─────────────────────────────── */
#chatbox-view-form {
    padding: 16px 16px 20px;
    background: #ffffff;
}

.cb-back-link {
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
}
.cb-back-link:hover { color: #1e3a5f; }

.form-intro {
    font-size: 12.5px;
    margin-bottom: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* ── CF7 form inputs — scoped to #chatbox ──── */
#chatbox .wpcf7-form p {
    margin: 0 0 8px;
}

#chatbox .wpcf7-form-control {
    width: 100%;
    box-sizing: border-box;
}

#chatbox .wpcf7-text,
#chatbox .wpcf7-textarea,
#chatbox .wpcf7-tel,
#chatbox .wpcf7-email,
#chatbox .wpcf7-select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #1f2937;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
}

#chatbox .wpcf7-text:focus,
#chatbox .wpcf7-textarea:focus,
#chatbox .wpcf7-tel:focus,
#chatbox .wpcf7-email:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
    background: #fff;
}

#chatbox .wpcf7-text::placeholder,
#chatbox .wpcf7-tel::placeholder,
#chatbox .wpcf7-email::placeholder,
#chatbox .wpcf7-textarea::placeholder {
    color: #b0b8c8;
}

#chatbox .wpcf7-textarea {
    resize: vertical;
    min-height: 70px;
}

#chatbox .wpcf7-submit {
    width: 100%;
    background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(30,58,95,0.3);
    margin-top: 4px;
}
#chatbox .wpcf7-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

#chatbox .wpcf7-response-output {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: none !important;
}

#chatbox .wpcf7-mail-sent-ok {
    background: #f0fdf4;
    color: #166534;
}

#chatbox .wpcf7-validation-errors,
#chatbox .wpcf7-spam-blocked {
    background: #fef2f2;
    color: #991b1b;
}

/* ── Mobile ────────────────────────────────── */
@media (max-width: 480px) {
    #chatbox {
        width: 300px;
        left: 12px;
        bottom: 12px;
        /* intentionally NOT setting right — keeps tawk.to visible */
    }
    #chatbox.chatbox-minimized {
        width: 175px;
    }
}