
:root {
    --yaftom-blue: #1688c9;
    --yaftom-blue-2: #0d72ad;
    --yaftom-ink: #101828;
    --yaftom-muted: #64748b;
    --yaftom-border: #dde7f0;
    --yaftom-soft: #f8fbfe;
    --yaftom-green: #16a34a;
    --yaftom-red: #e11d48;
}

.yaftom-op-open-btn,
.yaftom-order-open-btn,
.yaftom-order-btn,
.yaftom-plan-btn {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yaftom-blue), var(--yaftom-blue-2));
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    padding: 11px 22px;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(22, 136, 201, .25);
    transition: transform .18s ease, box-shadow .18s ease;
}

.yaftom-op-open-btn:hover,
.yaftom-order-open-btn:hover,
.yaftom-order-btn:hover,
.yaftom-plan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(22, 136, 201, .34);
}

.yaftom-op-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 9px;
    box-sizing: border-box;
    isolation: isolate;
}

.yaftom-op-modal.is-open {
    display: flex;
}

.yaftom-op-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
    background:
        radial-gradient(circle at 30% 20%, rgba(22, 136, 201, .18), transparent 34%),
        rgba(15, 23, 42, .66);
    backdrop-filter: blur(7px);
}

.yaftom-op-dialog {
    position: relative !important;
    z-index: 2147483647 !important;
    max-height: calc(100vh - 18px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(221, 231, 240, .95);
    border-radius: 16px;
    padding: 13px 14px 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
    animation: yaftomOPPop .18s ease;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    box-sizing: border-box;
}

@keyframes yaftomOPPop {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.yaftom-op-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 20px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    z-index: 3;
}

.yaftom-op-head-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    text-align: center !important;
    padding: 6px 34px 10px 34px;
    border-bottom: 1px solid #eef3f8;
    margin-bottom: 10px;
}

.yaftom-op-brand-logo {
    width: 160px !important;
    max-width: 88% !important;
    max-height: 58px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 4px !important;
    flex: 0 0 auto;
}

.yaftom-op-head-row h2 {
    color: var(--yaftom-ink);
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.02em;
    text-align: center !important;
}

.yaftom-op-head-row p,
.yaftom-op-logo-desc {
    margin: 0 auto !important;
    color: var(--yaftom-muted);
    line-height: 1.25;
    font-size: 11.5px;
    text-align: center !important;
    max-width: 310px;
    display: block;
}

.yaftom-op-form label {
    display: block;
    margin: 0;
}

.yaftom-op-form label span,
.yaftom-op-domain-row > span {
    display: block;
    font-size: 11px;
    color: var(--yaftom-ink);
    font-weight: 800;
    margin-bottom: 4px;
}

.yaftom-op-plan-grid {
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    border: 1px solid var(--yaftom-border);
    border-radius: 12px;
    padding: 9px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.yaftom-op-plan-grid label:first-child {
    grid-column: 1 / -1;
}

.yaftom-op-form input,
.yaftom-op-form select,
.yaftom-op-form textarea {
    width: 100%;
    border: 1px solid #d8e3ed;
    border-radius: 8px;
    padding: 8px 9px;
    font-size: 12.5px;
    min-height: 34px;
    color: var(--yaftom-ink);
    outline: none;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    box-sizing: border-box;
}

.yaftom-op-form input:focus,
.yaftom-op-form select:focus,
.yaftom-op-form textarea:focus {
    border-color: var(--yaftom-blue);
    box-shadow: 0 0 0 3px rgba(22, 136, 201, .12);
}

.yaftom-op-price-field input,
.yaftom-op-form input[readonly] {
    background: #eef8ff;
    color: #0b6fae;
    cursor: not-allowed;
    font-weight: 900;
}

.yaftom-op-form select:disabled {
    background: #f8fafc;
    cursor: not-allowed;
}

.yaftom-op-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.yaftom-op-domain-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
    align-items: center;
    margin: 0 0 8px;
}

.yaftom-op-domain-row > span {
    margin: 0;
    color: var(--yaftom-muted);
}

.yaftom-op-domain-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #d8e3ed;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    background: #fff;
}

.yaftom-op-domain-row input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.yaftom-op-message {
    margin-bottom: 8px !important;
}

.yaftom-op-form textarea {
    resize: none;
    min-height: 44px;
    max-height: 44px;
    line-height: 1.25;
}

.yaftom-op-submit {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yaftom-blue), var(--yaftom-blue-2));
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    padding: 11px 16px;
    margin: 0;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(22, 136, 201, .28);
}

.yaftom-op-submit:disabled {
    opacity: .72;
    cursor: wait;
}

.yaftom-op-foot {
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 11px;
    margin-top: 6px;
    text-align: center;
}

.yaftom-op-response {
    font-weight: 700;
    line-height: 1.25;
    font-size: 11.5px;
}

.yaftom-op-response.is-success { color: var(--yaftom-green); }
.yaftom-op-response.is-error { color: var(--yaftom-red); }

body.yaftom-op-lock {
    overflow: hidden !important;
}

/* Optional pricing shortcode */
.yaftom-op-pricing {
    padding: 50px 15px;
    background: linear-gradient(135deg, #eef7fd 0%, #ffffff 45%, #edf6fb 100%);
    border-radius: 24px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.yaftom-op-pricing-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 34px;
}

.yaftom-op-pricing-head span {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(22, 136, 201, .12);
    color: var(--yaftom-blue);
    font-weight: 900;
}

.yaftom-op-pricing-head h2 {
    margin: 16px 0 8px;
    color: var(--yaftom-ink);
    font-size: clamp(30px, 4vw, 46px);
}

.yaftom-op-pricing-head p {
    color: #64748b;
    margin: 0;
}

.yaftom-op-pricing-grid {
    display: grid;
    grid-template-columns: repeat(var(--yaftom-columns, 4), minmax(0, 1fr));
    gap: 18px;
    max-width: 1260px;
    margin: 0 auto;
}

.yaftom-op-price-card {
    background: #fff;
    border: 1px solid var(--yaftom-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .06);
}

.yaftom-op-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(22, 136, 201, .1);
    color: var(--yaftom-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 24px;
}

.yaftom-op-service {
    color: var(--yaftom-blue);
    font-weight: 800;
    margin: 0 0 8px;
}

.yaftom-op-price-card h3 {
    margin: 0;
    color: var(--yaftom-ink);
    font-size: 26px;
}

.yaftom-op-price {
    color: var(--yaftom-ink);
    font-weight: 900;
    font-size: 32px;
    margin: 22px 0;
}

/* Admin */
.yaftom-admin-guide {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 18px 0;
    max-width: 1180px;
}

.yaftom-admin-plan-table input.regular-text {
    width: 100%;
    max-width: 220px;
}

.yaftom-admin-plan-table code {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .yaftom-op-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .yaftom-op-dialog {
        padding: 12px;
        border-radius: 14px;
        max-height: calc(100vh - 16px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .yaftom-op-head-row {
        padding: 4px 28px 10px 28px;
    }

    .yaftom-op-brand-logo {
        width: 135px !important;
        max-height: 50px !important;
    }

    .yaftom-op-head-row h2 {
        font-size: 16px;
    }

    .yaftom-op-plan-grid,
    .yaftom-op-two-col,
    .yaftom-op-domain-row,
    .yaftom-op-pricing-grid {
        grid-template-columns: 1fr;
    }

    .yaftom-op-domain-row label {
        justify-content: center;
    }
}


/* Requested: no placeholder text in customer contact fields */
.yaftom-op-form input::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}


/* Fixed close button color override */
#yaftomOPModal .yaftom-op-dialog > button.yaftom-op-close[data-yaftom-close],
#yaftomOPModal .yaftom-op-dialog > button.yaftom-op-close[data-yaftom-close]:hover,
#yaftomOPModal .yaftom-op-dialog > button.yaftom-op-close[data-yaftom-close]:focus,
body .yaftom-op-modal .yaftom-op-close,
body .yaftom-op-modal .yaftom-op-close:hover,
body .yaftom-op-modal .yaftom-op-close:focus {
    background: var(--yaftom-close-color, #1688c9) !important;
    background-color: var(--yaftom-close-color, #1688c9) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 0 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    box-shadow: 0 8px 20px rgba(22, 136, 201, .25) !important;
}
#yaftomOPModal .yaftom-op-close::before,
#yaftomOPModal .yaftom-op-close::after {
    color: #ffffff !important;
    background: transparent !important;
}


/* Domain yes/no/skip behavior */
.yaftom-op-domain-field.is-disabled input,
#yaftomDomainInput:disabled {
    background: #f4f7fa !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: .85;
}


/* Hide domain input when customer selects Skip */
.yaftom-op-domain-field.is-hidden {
    display: none !important;
}


/* Small WhatsApp prompt after successful email */
.yaftom-op-whatsapp-prompt {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .22);
    backdrop-filter: blur(3px);
    border-radius: 16px;
}

.yaftom-op-whatsapp-prompt.is-open {
    display: flex;
}

.yaftom-op-whatsapp-card {
    width: min(330px, 100%);
    background: #ffffff;
    border: 1px solid #dde7f0;
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .20);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.yaftom-op-whatsapp-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}

.yaftom-op-whatsapp-card h3 {
    margin: 0 0 6px;
    color: #101828;
    font-size: 17px;
    font-weight: 900;
}

.yaftom-op-whatsapp-card p {
    margin: 0 0 15px;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.4;
}

.yaftom-op-whatsapp-actions {
    display: grid;
    gap: 8px;
}

.yaftom-op-whatsapp-btn,
.yaftom-op-whatsapp-btn:hover,
.yaftom-op-whatsapp-btn:focus {
    background: #25D366 !important;
    color: #ffffff !important;
    border-radius: 999px;
    padding: 10px 14px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 900;
    display: block;
}

.yaftom-op-whatsapp-close {
    border: 1px solid #d8e3ed;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}


/* v22: Highlight WhatsApp confirmation message */
.yaftom-op-whatsapp-question {
    display: block;
    margin: 4px 0 8px !important;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eaf8f0;
    border: 1px solid rgba(37, 211, 102, .35);
    color: #0f5132 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
}

.yaftom-op-whatsapp-subtext {
    margin: 0 0 14px !important;
    color: #64748b !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
}


/* v22: Force WhatsApp button visible */
#yaftomOPWhatsAppBtn,
.yaftom-op-whatsapp-btn,
.yaftom-op-whatsapp-actions .yaftom-op-whatsapp-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    background: #25D366 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 11px 16px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 24px rgba(37, 211, 102, .32) !important;
    pointer-events: auto !important;
}

#yaftomOPWhatsAppBtn.is-disabled {
    background: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}


/* v23: Force all close buttons visible */
#yaftomOPModal .yaftom-op-close,
body #yaftomOPModal .yaftom-op-close,
body .yaftom-op-modal .yaftom-op-dialog > .yaftom-op-close {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    z-index: 2147483647 !important;
    background: var(--yaftom-close-color, #1688c9) !important;
    background-color: var(--yaftom-close-color, #1688c9) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    line-height: 30px !important;
    font-weight: 700 !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 8px 20px rgba(22, 136, 201, .28) !important;
    pointer-events: auto !important;
}

#yaftomOPModal .yaftom-op-close:hover,
#yaftomOPModal .yaftom-op-close:focus {
    background: #0d72ad !important;
    color: #ffffff !important;
}

#yaftomOPWhatsAppClose,
body #yaftomOPWhatsAppClose,
.yaftom-op-whatsapp-close,
.yaftom-op-whatsapp-actions .yaftom-op-whatsapp-close {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    background: #ffffff !important;
    color: #1688c9 !important;
    border: 2px solid #1688c9 !important;
    border-radius: 999px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: 0 8px 18px rgba(22, 136, 201, .12) !important;
    pointer-events: auto !important;
}

#yaftomOPWhatsAppClose:hover,
#yaftomOPWhatsAppClose:focus,
.yaftom-op-whatsapp-close:hover,
.yaftom-op-whatsapp-close:focus {
    background: #1688c9 !important;
    color: #ffffff !important;
}


/* v24 WhatsApp flow fix */
.yaftom-op-whatsapp-card h3 {
    color: #16a34a !important;
}
.yaftom-op-whatsapp-card {
    position: relative !important;
    z-index: 20 !important;
}
.yaftom-op-whatsapp-actions {
    margin-top: 12px !important;
}
