/* Funnel Pro Checkout Frontend styles */

.funnel-pro-container {
    width: 100%;
    max-width: 580px;
    margin: 20px auto;
    box-sizing: border-box;
}

.fp-logo-header {
    text-align: center;
    margin-bottom: 12px;
}

.fp-logo-header img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

.fp-secure-badge-row {
    text-align: center;
    margin-bottom: 16px;
}

.fp-secure-badge {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Card Container */
.funnel-pro-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #7331A8;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Section Wrapper for modular widgets */
.funnel-pro-section-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    padding: 24px;
    margin-bottom: 20px;
}

/* Accordion Bar */
.fp-summary-accordion-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.fp-summary-accordion-header:hover {
    background: #f1f5f9;
}

.fp-accordion-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fp-accordion-price {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin-left: auto;
    margin-right: 8px;
}

.fp-accordion-icon {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.fp-summary-accordion-header.active .fp-accordion-icon {
    transform: rotate(180deg);
}

.fp-summary-accordion-content {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px;
}

/* Form Styles */
.funnel-pro-checkout-form {
    padding: 24px;
}

.fp-form-section h2 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-section-num-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.fp-section-num-title .fp-num {
    background: #7331A8;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-section-num-title h2 {
    margin: 0 !important;
    font-size: 15px !important;
}

/* Connection Radio Cards */
.fp-tiers-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fp-tier-radio-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}

.fp-tier-radio-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.fp-tier-radio-card.active {
    border-color: #7331A8;
    background: rgba(115, 49, 168, 0.02);
    box-shadow: 0 0 0 1px #7331A8;
}

.fp-card-inner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fp-radio-circle {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.fp-tier-radio-card.active .fp-radio-circle {
    border-color: #7331A8;
}

.fp-tier-radio-card.active .fp-radio-circle:after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: #7331A8;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

.fp-tier-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-tier-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.fp-tier-badge {
    background: #fef08a;
    color: #854d0e;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fp-card-inner-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-price-regular {
    font-size: 12px;
    text-decoration: line-through;
    color: #94a3b8;
}

.fp-price-sale {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.fp-tier-radio-card.active .fp-price-sale {
    color: #7331A8;
}

/* Form Fields */
.fp-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.fp-form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.fp-form-group label .required {
    color: #ef4444;
}

.fp-form-group input[type="text"],
.fp-form-group input[type="email"],
.fp-form-group input[type="tel"] {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.fp-form-group input[type="text"]:focus,
.fp-form-group input[type="email"]:focus,
.fp-form-group input[type="tel"]:focus {
    border-color: #7331A8;
    box-shadow: 0 0 0 1px #7331A8;
}

/* Phone Flags wrapper */
.fp-phone-input-wrapper {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    align-items: stretch;
}

.fp-phone-input-wrapper input[type="tel"] {
    border: none !important;
    border-radius: 0 !important;
    padding-left: 10px !important;
}

.fp-phone-flags-dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.fp-selected-flag {
    font-size: 15px;
}

.fp-arrow-down {
    font-size: 9px;
    color: #64748b;
}

.fp-flags-list-popover {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 210px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.flag-item {
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.flag-item:hover {
    background: #f1f5f9;
}

/* Custom Question options radio list */
.fp-radio-option-card input[type="radio"]:checked + span {
    color: #7331A8 !important;
}

.fp-radio-option-card:has(input[type="radio"]:checked) {
    border-color: #7331A8 !important;
    background: rgba(115, 49, 168, 0.02) !important;
    box-shadow: 0 0 0 1px #7331A8;
}

/* Payment Gateway and place order buttons */
.fp-payment-options-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fp-payment-gateway-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px 16px;
}

.fp-gateway-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.fp-gateway-card-body {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.5;
    text-align: left;
}

.fp-submit-btn {
    width: 100%;
    background: #16a34a;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.2);
}

.fp-submit-btn:hover {
    background: #15803d;
    box-shadow: 0 6px 12px -1px rgba(22, 163, 74, 0.3);
}

.fp-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.fp-btn-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: fp-spin 1s ease-in-out infinite;
}

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

.fp-trust-badges-footer {
    text-align: center;
    margin-top: 15px;
}

.fp-trust-badges-img {
    max-width: 100%;
    max-height: 38px;
    width: auto;
    object-fit: contain;
}

/* Floating WhatsApp Button */
.fp-wa-float {
    position: fixed;
    width: 54px;
    height: 54px;
    bottom: 24px;
    right: 24px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.fp-wa-float:hover {
    transform: scale(1.08);
}

/* Responsive grid overrides */
@media (max-width: 480px) {
    .fp-name-row {
        flex-direction: column;
        gap: 0;
    }
    .fp-section-num-title {
        align-items: center;
        gap: 8px;
    }
    .fp-section-num-title h2 {
        font-size: 14.5px !important;
        line-height: 1.3 !important;
    }
    .fp-tier-radio-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    .fp-card-inner-left {
        width: 100%;
        align-items: center;
    }
    .fp-tier-title-row {
        flex-wrap: wrap;
        gap: 6px;
        flex-grow: 1;
    }
    .fp-card-inner-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
        margin-top: 4px;
    }
    .fp-wa-float {
        width: 46px;
        height: 46px;
        bottom: 16px;
        right: 16px;
    }
    .fp-wa-float svg {
        width: 22px;
        height: 22px;
    }
    .fp-features-grid {
        grid-template-columns: 1fr !important;
    }
}
.funnel-pro-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin: 15px 0;
}
.fp-coupon-row-wrapper input:focus {
    border-color: #7331A8 !important;
}
.fp-apply-coupon-btn:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}
.static-mode {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    margin-bottom: 20px;
}
.fp-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 12px;
}

/* RTL Mode Directionality Overrides */
.rtl-mode {
    direction: rtl !important;
    text-align: right !important;
}
.rtl-mode .fp-card-inner-left {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-card-inner-right {
    margin-left: unset !important;
    margin-right: auto !important;
}
.rtl-mode .fp-section-num-title {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-phone-input-wrapper {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-phone-flags-dropdown {
    border-right: none !important;
    border-left: 1px solid #cbd5e1 !important;
    padding-left: 10px !important;
    padding-right: 0 !important;
}
.rtl-mode .fp-flags-list-popover {
    left: unset !important;
    right: 0 !important;
}
.rtl-mode .fp-form-group {
    text-align: right !important;
}
.rtl-mode .fp-thankyou-steps {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-features-grid .feature-item {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-thankyou-cta {
    flex-direction: row-reverse !important;
}
.rtl-mode #fp-social-proof-bar {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-cart-item-row {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-cart-item-qty-badge {
    right: unset !important;
    left: -6px !important;
}
.rtl-mode .fp-cart-item-title-col {
    text-align: right !important;
}
.rtl-mode .fp-cart-item-price-col {
    text-align: left !important;
    align-items: flex-start !important;
}
.rtl-mode .fp-summary-row {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-summary-row.total-row {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-coupon-row-wrapper {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-radio-option-card {
    flex-direction: row-reverse !important;
}
.rtl-mode .fp-radio-option-card input {
    margin-right: 0 !important;
    margin-left: 12px !important;
}
.rtl-mode .fp-preview-secure-header div,
.rtl-mode .fp-thankyou-steps div {
    flex-direction: row-reverse !important;
}

