/**
 * Sai Sandhya Smart Quick Popup - Frontend Styles
 * High-conversion responsive design
 */

:root {
    --ssqp-primary: #ff6a00;
    --ssqp-primary-dark: #e55a00;
    --ssqp-primary-gradient: linear-gradient(135deg, #ff6a00 0%, #ff8c1a 100%);
    --ssqp-wa: #25D366;
    --ssqp-wa-dark: #128C7E;
    --ssqp-wa-gradient: linear-gradient(135deg, #25D366 0%, #1fb355 100%);
    --ssqp-navy: #0f172a;
    --ssqp-slate: #1e293b;
    --ssqp-text: #0f172a;
    --ssqp-muted: #64748b;
    --ssqp-bg: #ffffff;
    --ssqp-radius: 20px;
    --ssqp-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.28), 0 10px 25px -5px rgba(0, 0, 0, 0.12);
}

/* OVERLAY & BACKDROP */
.ssqp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}

.ssqp-overlay.ssqp-visible {
    opacity: 1;
    visibility: visible;
}

.ssqp-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* MODAL CARD */
.ssqp-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--ssqp-bg);
    border-radius: var(--ssqp-radius);
    box-shadow: var(--ssqp-shadow);
    border: 1px solid rgba(255, 106, 0, 0.15);
    overflow: hidden;
    z-index: 2;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    color: var(--ssqp-text);
    box-sizing: border-box;
}

.ssqp-overlay.ssqp-visible .ssqp-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* CLOSE CROSS BUTTON */
.ssqp-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    outline: none;
}

.ssqp-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.ssqp-close-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

/* BRAND HEADER */
.ssqp-card-header {
    display: flex;
    align-items: center;
    padding: 13px 48px 13px 16px;
    background: linear-gradient(180deg, #fff9f5 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(255, 106, 0, 0.12);
    position: relative;
    box-sizing: border-box;
}

.ssqp-brand-box {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.ssqp-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.ssqp-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    line-height: 1.2;
}

.ssqp-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--ssqp-navy);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.ssqp-brand-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
}

.ssqp-live-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    white-space: nowrap;
}

.ssqp-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: ssqp-pulse 1.8s infinite;
}

.ssqp-brand-dot-sep {
    color: #cbd5e1;
    font-size: 10px;
}

.ssqp-brand-location {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ssqp-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@keyframes ssqp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* BODY CONTENT */
.ssqp-card-body {
    padding: 22px 22px 24px;
}

.ssqp-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.ssqp-title {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--ssqp-navy);
    letter-spacing: -0.4px;
}

.ssqp-subtitle {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ssqp-muted);
}

.ssqp-subtitle:empty {
    display: none;
    margin: 0;
}

/* TRUST TAGS */
.ssqp-trust-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
}

.ssqp-tag {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px 8px;
}

/* ACTION BUTTONS */
.ssqp-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ssqp-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none !important;
    font-family: inherit;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
}

.ssqp-btn:hover {
    transform: translateY(-2px);
}

.ssqp-btn:active {
    transform: scale(0.985);
}

/* CALL BUTTON - Executive Midnight Navy */
.ssqp-btn-call {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 22px -4px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ssqp-btn-call:hover {
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ssqp-btn-icon-pulse {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    flex-shrink: 0;
    animation: ssqp-ring 2.8s infinite ease-in-out;
}

.ssqp-btn-icon-pulse svg {
    stroke: #0f172a;
    width: 20px;
    height: 20px;
}

@keyframes ssqp-ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate(12deg); }
    50% { transform: rotate(0deg); }
}

/* WHATSAPP BUTTON - Official WhatsApp Green */
.ssqp-btn-wa {
    background: linear-gradient(135deg, #25D366 0%, #1ea952 50%, #128C7E 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 22px -4px rgba(37, 211, 102, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ssqp-btn-wa:hover {
    box-shadow: 0 12px 28px -4px rgba(37, 211, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ssqp-btn-icon-wa {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #25D366;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    flex-shrink: 0;
}

.ssqp-btn-icon-wa svg {
    fill: #25D366;
    width: 21px;
    height: 21px;
}

.ssqp-btn-label-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
    flex-grow: 1;
}

.ssqp-btn-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ssqp-btn-phone,
.ssqp-btn-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95) !important;
    margin-top: 2px;
    letter-spacing: 0.1px;
}

.ssqp-btn-arrow {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 6px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ssqp-btn:hover .ssqp-btn-arrow {
    transform: translateX(3px);
    color: #ffffff;
}

/* FOOTER NOTE */
.ssqp-card-footer {
    padding: 10px 18px 14px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.ssqp-footer-note {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 600;
}

/* FLOATING CORNER BUBBLE */
.ssqp-floating-bubble {
    position: fixed !important;
    z-index: 999990 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.ssqp-floating-bubble.ssqp-pos-bottom-right {
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
}

.ssqp-floating-bubble.ssqp-pos-bottom-left {
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
}

.ssqp-bubble-main-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 106, 0, 0.4);
    padding: 11px 18px 11px 14px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
    font-family: inherit;
    transition: all 0.25s ease;
    outline: none;
}

.ssqp-bubble-main-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 106, 0, 0.35);
    border-color: #ff6a00;
}

.ssqp-bubble-icon-phone {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ssqp-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssqp-bubble-pill-text {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ssqp-bubble-badge-pulse {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ssqp-bounce 2s infinite;
}

@keyframes ssqp-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* MOBILE ADAPTATION - Sleek, centered, uncluttered mobile experience */
@media (max-width: 640px) {
    .ssqp-overlay {
        padding: 16px;
        align-items: center;
        justify-content: center;
    }

    .ssqp-modal-card {
        width: 100%;
        max-width: 360px;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 20px;
        transform: translateY(16px) scale(0.97);
    }

    .ssqp-overlay.ssqp-visible .ssqp-modal-card {
        transform: translateY(0) scale(1);
    }

    .ssqp-card-header {
        padding: 11px 44px 11px 13px;
    }

    .ssqp-brand-box {
        gap: 9px;
    }

    .ssqp-brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .ssqp-brand-name {
        font-size: 13.5px;
    }

    .ssqp-brand-meta {
        font-size: 10px;
        gap: 5px;
    }

    .ssqp-live-status {
        font-size: 10px;
        gap: 4px;
    }

    .ssqp-live-dot {
        width: 6px;
        height: 6px;
    }

    .ssqp-brand-location {
        font-size: 9.5px;
    }

    .ssqp-close-btn {
        width: 30px;
        height: 30px;
        top: 11px;
        right: 11px;
    }

    .ssqp-card-body {
        padding: 14px 16px 18px;
    }

    .ssqp-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-bottom: 8px;
    }

    .ssqp-title {
        font-size: 17px;
        line-height: 1.25;
        margin-bottom: 6px;
    }

    .ssqp-subtitle {
        font-size: 12px;
        line-height: 1.45;
        margin-bottom: 12px;
    }

    .ssqp-actions-wrap {
        gap: 9px;
    }

    .ssqp-btn {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .ssqp-btn-icon-pulse,
    .ssqp-btn-icon-wa {
        width: 34px;
        height: 34px;
        margin-right: 11px;
    }

    .ssqp-btn-icon-pulse svg,
    .ssqp-btn-icon-wa svg {
        width: 18px;
        height: 18px;
    }

    .ssqp-btn-text {
        font-size: 13.5px;
    }

    .ssqp-btn-phone,
    .ssqp-btn-sub {
        font-size: 11px;
    }

    .ssqp-floating-bubble.ssqp-pos-bottom-right,
    .ssqp-floating-bubble.ssqp-pos-bottom-left {
        bottom: 16px;
        right: 16px;
        left: auto;
    }

    .ssqp-bubble-main-btn {
        padding: 8px 14px 8px 10px;
    }

    .ssqp-bubble-icon-phone {
        width: 28px;
        height: 28px;
    }

    .ssqp-bubble-icon-phone svg {
        width: 16px;
        height: 16px;
    }

    .ssqp-bubble-pill-text {
        font-size: 12px;
    }
}
