/* =====================================================
   Kkey WhatsApp – Pre-Chat Form Modal
   ===================================================== */

/* ── Overlay backdrop ──────────────────────────────── */
#kkey-prechat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99998;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: kkey-fade-in 0.2s ease;
}

#kkey-prechat-overlay.kkey-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes kkey-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal card ────────────────────────────────────── */
#kkey-prechat-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 420px;
    overflow: hidden;
    animation: kkey-slide-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes kkey-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Modal header ──────────────────────────────────── */
#kkey-prechat-modal .kkey-pcf-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 60%, #25d366 100%);
    padding: 20px 22px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

#kkey-prechat-modal .kkey-pcf-header img.kkey-pcf-wa-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

#kkey-prechat-modal .kkey-pcf-header-text {
    flex: 1;
}

#kkey-prechat-modal .kkey-pcf-header h3 {
    color: #ffffff;
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

#kkey-prechat-modal .kkey-pcf-header p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

#kkey-prechat-modal button.kkey-pcf-close,
button#kkey-pcf-close-btn {
    all: unset !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
}

#kkey-prechat-modal button.kkey-pcf-close:hover,
button#kkey-pcf-close-btn:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05) !important;
}

/* ── Agent info strip ──────────────────────────────── */
#kkey-prechat-modal .kkey-pcf-agent-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: #f0faf6;
    border-bottom: 1px solid #e2f5ee;
}

#kkey-prechat-modal .kkey-pcf-agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #25d366;
    flex-shrink: 0;
}

#kkey-prechat-modal .kkey-pcf-agent-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

#kkey-prechat-modal .kkey-pcf-agent-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a2a3a;
}

#kkey-prechat-modal .kkey-pcf-agent-info span {
    font-size: 12px;
    color: #25d366;
    display: flex;
    align-items: center;
    gap: 5px;
}

#kkey-prechat-modal .kkey-pcf-agent-info span::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #25d366;
    border-radius: 50%;
    animation: kkey-pulse 1.5s ease infinite;
}

@keyframes kkey-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── Form body ─────────────────────────────────────── */
#kkey-prechat-modal .kkey-pcf-body {
    padding: 20px 22px 22px;
}

#kkey-prechat-modal .kkey-pcf-field {
    margin-bottom: 14px;
}

#kkey-prechat-modal .kkey-pcf-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

#kkey-prechat-modal .kkey-pcf-field label span.kkey-pcf-required {
    color: #e53e3e;
    margin-left: 2px;
}

#kkey-prechat-modal .kkey-pcf-field input,
#kkey-prechat-modal .kkey-pcf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    font-family: inherit;
}

#kkey-prechat-modal .kkey-pcf-field input:focus,
#kkey-prechat-modal .kkey-pcf-field textarea:focus {
    border-color: #25d366;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

#kkey-prechat-modal .kkey-pcf-field input.kkey-pcf-error,
#kkey-prechat-modal .kkey-pcf-field textarea.kkey-pcf-error {
    border-color: #fc8181;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.12);
}

#kkey-prechat-modal .kkey-pcf-field textarea {
    resize: vertical;
    min-height: 70px;
}

#kkey-prechat-modal .kkey-pcf-error-msg {
    color: #e53e3e;
    font-size: 11px;
    margin-top: 4px;
    display: none;
}

#kkey-prechat-modal .kkey-pcf-error-msg.kkey-visible {
    display: block;
}

/* ── Submit button ─────────────────────────────────── */
#kkey-prechat-modal .kkey-pcf-submit {
    width: 100%;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s ease, transform 0.15s ease;
    margin-top: 6px;
    font-family: inherit;
}

#kkey-prechat-modal .kkey-pcf-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

#kkey-prechat-modal .kkey-pcf-submit:active {
    transform: translateY(0);
}

#kkey-prechat-modal .kkey-pcf-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

#kkey-prechat-modal .kkey-pcf-submit svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Spinner inside button */
#kkey-prechat-modal .kkey-pcf-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kkey-spin 0.7s linear infinite;
}

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

#kkey-prechat-modal.kkey-loading .kkey-pcf-submit .kkey-pcf-spinner { display: block; }
#kkey-prechat-modal.kkey-loading .kkey-pcf-btn-icon { display: none; }

/* ── Privacy note ──────────────────────────────────── */
#kkey-prechat-modal .kkey-pcf-privacy {
    text-align: center;
    font-size: 11px;
    color: #a0aec0;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────── */
@media screen and (max-width: 480px) {
    #kkey-prechat-modal {
        width: 96%;
        max-width: none;
        border-radius: 14px;
    }

    #kkey-prechat-modal .kkey-pcf-header,
    #kkey-prechat-modal .kkey-pcf-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ── Inline step wizard (inside kkey-whatsapp-content) ─────────── */

/* The inline panel fills the widget popup just like agent list items */
li.kkey-pcf-inline-panel {
    display: none; /* JS controls visibility */
    padding: 0;
    list-style: none;
}

/* ── Header row: Back button + progress indicator ── */
.kkey-pcf-inline-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px 10px !important;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 60%, #25d366 100%) !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 5 !important;
    border-top-left-radius: inherit !important;
    border-top-right-radius: inherit !important;
}

/* ── Standalone Professional Back Button (isolated against any WordPress theme) ── */
button.kkey-pcf-inline-back,
.kkey-pcf-inline-header button.kkey-pcf-inline-back,
.kkey-container button.kkey-pcf-inline-back {
    all: unset !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 12px 0 9px !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    text-decoration: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    vertical-align: middle !important;
}

button.kkey-pcf-inline-back:hover,
.kkey-pcf-inline-header button.kkey-pcf-inline-back:hover,
.kkey-container button.kkey-pcf-inline-back:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: translateX(-2px) !important;
}

button.kkey-pcf-inline-back:active,
.kkey-pcf-inline-header button.kkey-pcf-inline-back:active,
.kkey-container button.kkey-pcf-inline-back:active {
    background: rgba(255, 255, 255, 0.24) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translateX(-1px) scale(0.97) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

button.kkey-pcf-inline-back:focus-visible,
.kkey-pcf-inline-header button.kkey-pcf-inline-back:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
}

/* Icon inside back button */
button.kkey-pcf-inline-back svg.kkey-pcf-back-icon {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.2s ease !important;
}

button.kkey-pcf-inline-back:hover svg.kkey-pcf-back-icon {
    transform: translateX(-1.5px) !important;
}

button.kkey-pcf-inline-back span,
button.kkey-pcf-inline-back span.kkey-pcf-back-text {
    display: inline-block !important;
    line-height: 1 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-transform: none !important;
    letter-spacing: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Solid back button on light / thank-you surfaces */
button.kkey-pcf-inline-back.kkey-pcf-inline-back-solid,
.kkey-pcf-thankyou-box button.kkey-pcf-inline-back {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%) !important;
    border: 1px solid rgba(18, 140, 126, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.25) !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 16px 0 12px !important;
    font-size: 13px !important;
    text-shadow: none !important;
    margin: 12px auto 0 !important;
}

button.kkey-pcf-inline-back.kkey-pcf-inline-back-solid:hover,
.kkey-pcf-thankyou-box button.kkey-pcf-inline-back:hover {
    background: linear-gradient(135deg, #064c44 0%, #0e7367 50%, #1eb956 100%) !important;
    box-shadow: 0 6px 16px rgba(18, 140, 126, 0.35) !important;
    transform: translateY(-1px) !important;
}

button.kkey-pcf-inline-back.kkey-pcf-inline-back-solid:hover svg.kkey-pcf-back-icon,
.kkey-pcf-thankyou-box button.kkey-pcf-inline-back:hover svg.kkey-pcf-back-icon {
    transform: translateX(-2px) !important;
}

/* ── Progress indicator styling ── */
.kkey-pcf-inline-progress {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    letter-spacing: 0.4px !important;
    text-transform: uppercase !important;
    background: rgba(0, 0, 0, 0.15) !important;
    padding: 5px 10px !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    user-select: none !important;
    margin: 0 !important;
}

/* ── Thank-You Box in Inline Panel ── */
.kkey-pcf-thankyou-box {
    padding: 24px 20px 20px !important;
    text-align: center !important;
    background: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.kkey-pcf-thankyou-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #e6f9f0 !important;
    color: #25d366 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 auto 10px !important;
    border: 2px solid #25d366 !important;
}

.kkey-pcf-thankyou-title {
    margin: 0 0 6px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a2a3a !important;
    line-height: 1.3 !important;
}

.kkey-pcf-thankyou-desc {
    margin: 0 0 16px !important;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

/* ── The wizard form body ── */
.kkey-pcf-inline-form {
    padding: 14px 16px 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Individual step container ── */
.kkey-pcf-il-step {
    animation: kkey-il-step-in 0.22s ease;
}

@keyframes kkey-il-step-in {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Field label ── */
.kkey-pcf-il-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.kkey-pcf-req {
    color: #e53e3e;
    margin-left: 2px;
}

/* ── Field input & textarea ── */
.kkey-pcf-il-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #2d3748;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    font-family: inherit;
    resize: vertical;
}
.kkey-pcf-il-input:focus {
    border-color: #25d366;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,211,102,0.12);
}
.kkey-pcf-il-input-error {
    border-color: #fc8181 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(252,129,129,0.12) !important;
}

/* ── Inline error message ── */
.kkey-pcf-il-error {
    color: #e53e3e;
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

/* ── Action buttons row ── */
.kkey-pcf-il-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

/* Next button */
.kkey-pcf-il-next-btn {
    width: 100%;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}
.kkey-pcf-il-next-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Submit button (shown on final step) */
.kkey-pcf-il-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}
.kkey-pcf-il-submit-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.kkey-pcf-il-submit-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.kkey-pcf-il-submit-btn:active { transform: translateY(0); }
.kkey-pcf-il-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Skip link */
.kkey-pcf-il-skip-link {
    text-align: center;
    font-size: 11px;
    color: #a0aec0;
    text-decoration: none;
    padding: 2px 0;
    transition: color 0.15s ease;
    display: block;
}
.kkey-pcf-il-skip-link:hover {
    color: #718096;
    text-decoration: underline;
}

/* ── Spinner (below submit button) ── */
.kkey-pcf-il-submit-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(37,211,102,0.25);
    border-top-color: #25d366;
    border-radius: 50%;
    animation: kkey-spin 0.7s linear infinite;
    margin: 6px auto 0;
}

/* ── Privacy note ── */
.kkey-pcf-il-privacy {
    text-align: center;
    font-size: 10px;
    color: #a0aec0;
    padding: 6px 16px 10px;
    margin: 0;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =====================================================
   KKEY QUOTE VIA WHATSAPP — v3.1.0
   "Get a Quote" button + modal styles
   Namespaced under .kkey-quote-* for full isolation
   ===================================================== */

/* ── Quote overlay (re-uses pre-chat overlay base) ──── */
#kkey-quote-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: kkey-fade-in 0.2s ease;
}

#kkey-quote-overlay.kkey-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Quote modal card (re-uses pre-chat modal base) ─── */
#kkey-quote-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 420px;
    overflow: hidden;
    animation: kkey-slide-up 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#kkey-quote-modal .kkey-pcf-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 60%, #25d366 100%);
    padding: 20px 22px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

#kkey-quote-modal .kkey-pcf-header img.kkey-pcf-wa-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

#kkey-quote-modal .kkey-pcf-header h3 {
    color: #ffffff;
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

#kkey-quote-modal .kkey-pcf-header #kkey-quote-product-label {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

#kkey-quote-modal .kkey-pcf-close {
    all: unset !important;
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    color: rgba(255,255,255,0.75) !important;
    font-size: 22px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 4px !important;
    border-radius: 50% !important;
    transition: color 0.15s, background 0.15s !important;
}

#kkey-quote-modal .kkey-pcf-close:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.15) !important;
}

#kkey-quote-modal .kkey-pcf-body {
    padding: 22px 22px 20px;
}

#kkey-quote-modal .kkey-quote-subtitle {
    color: #4a5568;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 16px;
    padding: 0;
}

/* ── Quote form fields (re-use pre-chat field styles) ── */
#kkey-quote-modal .kkey-pcf-field {
    margin-bottom: 14px;
}

#kkey-quote-modal .kkey-pcf-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

#kkey-quote-modal .kkey-pcf-required {
    color: #e53e3e;
    margin-left: 2px;
}

#kkey-quote-modal input[type="text"],
#kkey-quote-modal input[type="tel"],
#kkey-quote-modal input[type="email"] {
    all: unset !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 13px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #2d3748 !important;
    background: #f8fafc !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#kkey-quote-modal input:focus {
    border-color: #25d366 !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15) !important;
    background: #ffffff !important;
    outline: none !important;
}

#kkey-quote-modal input.kkey-pcf-error {
    border-color: #e53e3e !important;
    background: #fff5f5 !important;
}

#kkey-quote-modal .kkey-pcf-error-msg {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

#kkey-quote-modal .kkey-pcf-error-msg.kkey-visible {
    display: block;
}

/* ── Submit button ───────────────────────────────────── */
#kkey-quote-modal .kkey-pcf-submit {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 13px 20px !important;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    margin-top: 6px !important;
    transition: opacity 0.2s, transform 0.15s !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: 0.01em !important;
}

#kkey-quote-modal .kkey-pcf-submit:hover:not(:disabled) {
    opacity: 0.92 !important;
    transform: translateY(-1px) !important;
}

#kkey-quote-modal .kkey-pcf-submit:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

#kkey-quote-modal .kkey-pcf-submit .kkey-pcf-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Loading spinner on submit button */
#kkey-quote-modal.kkey-loading .kkey-pcf-submit .kkey-pcf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: kkey-spin 0.7s linear infinite;
    flex-shrink: 0;
}

#kkey-quote-modal .kkey-pcf-submit .kkey-pcf-spinner {
    display: none;
}

#kkey-quote-modal .kkey-pcf-privacy {
    text-align: center;
    font-size: 10px;
    color: #a0aec0;
    padding: 6px 0 2px;
    margin: 10px 0 0;
    line-height: 1.5;
}

/* ── "Get a Quote via WhatsApp" front-end button ─────── */
.kkey-quote-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 13px 22px !important;
    background: linear-gradient(135deg, #25d366 0%, #075e54 100%) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35) !important;
    transition: opacity 0.2s, transform 0.18s, box-shadow 0.18s !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: 0.01em !important;
    width: auto !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

.kkey-quote-btn:hover {
    opacity: 0.93 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45) !important;
}

.kkey-quote-btn-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: currentColor;
}

/* Entrance animation for the quote button */
.kkey-quote-btn-visible {
    animation: kkey-quote-btn-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes kkey-quote-btn-in {
    from { transform: scale(0.85) translateY(8px); opacity: 0; }
    to   { transform: scale(1) translateY(0);      opacity: 1; }
}

/* Price hidden state */
.kkey-quote-price-hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    #kkey-quote-modal {
        width: 95%;
        border-radius: 12px;
    }

    #kkey-quote-modal .kkey-pcf-header {
        padding: 16px 18px 14px;
    }

    #kkey-quote-modal .kkey-pcf-body {
        padding: 18px 18px 16px;
    }

    .kkey-quote-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   KKEY QUOTE VIA WHATSAPP — Robust Price & Add to Cart Suppression Rules
   Hides both top product price and variation price across all themes & builders
   ========================================================================== */
body.kkey-quote-active .summary .price,
body.kkey-quote-active .entry-summary .price,
body.kkey-quote-active .summary p.price,
body.kkey-quote-active .entry-summary p.price,
body.kkey-quote-active .summary span.price,
body.kkey-quote-active .entry-summary span.price,
body.kkey-quote-active .summary .woocommerce-Price-amount,
body.kkey-quote-active .entry-summary .woocommerce-Price-amount,
body.kkey-quote-active .single-product-summary .price,
body.kkey-quote-active .product-info .price,
body.kkey-quote-active .product-details .price,
body.kkey-quote-active .elementor-widget-woocommerce-product-price,
body.kkey-quote-active .elementor-widget-woocommerce-product-price .price,
body.kkey-quote-active .elementor-widget-woocommerce-product-price .woocommerce-Price-amount,
body.kkey-quote-active [data-widget_type="woocommerce-product-price.default"],
body.kkey-quote-active .wc-block-components-product-price,
body.kkey-quote-active .woocommerce-variation-price,
body.kkey-quote-active .woocommerce-variation-price .price,
body.kkey-quote-active .single_variation .woocommerce-variation-price,
body.kkey-quote-active .single_variation .price,
body.kkey-quote-active .single_variation_wrap .woocommerce-variation-price,
body.kkey-quote-active .single_variation_wrap .price,
body.kkey-quote-active form.variations_form .woocommerce-variation-price,
body.kkey-quote-active form.variations_form .single_variation .price,
body.kkey-quote-active p.price,
.kkey-quote-price-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body.kkey-quote-active form.variations_form .single_add_to_cart_button,
body.kkey-quote-active form.variations_form .quantity,
body.kkey-quote-active .woocommerce-variation-add-to-cart .single_add_to_cart_button,
body.kkey-quote-active .woocommerce-variation-add-to-cart .quantity,
.kkey-quote-hidden-ctrl {
    display: none !important;
    visibility: hidden !important;
}