/* Custom Forms Frontend Styles */
.ao-cf-wrapper {
    direction: rtl;
    text-align: right;
    font-family: inherit;
    box-sizing: border-box;
    margin: 30px auto;
    width: 100%;
    max-width: 1240px;
}

.ao-cf-wrapper *,
.ao-cf-wrapper *::before,
.ao-cf-wrapper *::after {
    box-sizing: border-box;
}

/* Sections Stacked (Full Width) */
.ao-cf-sections-wrapper {
    width: 100%;
    margin-bottom: 30px;
}

/* Section Box */
.ao-cf-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.ao-cf-section:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    border-color: #d1d5db;
}

.ao-cf-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
    flex-wrap: wrap;
}

.ao-cf-section-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 170px;
}

.ao-cf-section-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ao-cf-slider-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ao-cf-section-badge {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.ao-cf-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    flex: 1;
}

.ao-cf-section-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.ao-cf-section-status.unselected {
    background: #f3f4f6;
    color: #6b7280;
}

.ao-cf-section-status.selected {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* Swiper Slider Wrapper */
.ao-cf-swiper-wrap {
    position: relative;
    padding: 0;
    width: 100%;
}

.ao-cf-swiper {
    width: 100%;
    overflow: hidden;
    padding: 6px 2px 14px 2px !important;
}

/* Nav arrows */
.ao-cf-nav-btn {
    width: 28px !important;
    height: 28px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    outline: none !important;
}

.ao-cf-nav-btn:hover:not(.swiper-button-disabled) {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.ao-cf-nav-btn.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: default !important;
    pointer-events: none !important;
}

.ao-cf-nav-btn::after {
    display: none !important;
    content: none !important;
}

.ao-cf-nav-btn svg {
    display: block;
    width: 13px;
    height: 13px;
    pointer-events: none;
    stroke: currentColor;
    transition: transform 0.15s ease;
}

.ao-cf-nav-btn:hover svg {
    stroke: #ffffff;
}

.ao-cf-empty-breakdown {
    text-align: center;
    padding: 30px 15px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* Item Card (Small box in slider) */
.ao-cf-item-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 175px;
    user-select: none;
}

.ao-cf-item-card:hover {
    border-color: #93c5fd;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.08);
}

.ao-cf-item-card.is-selected {
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}

/* Checkmark indicator */
.ao-cf-item-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.2s ease;
}

.ao-cf-item-card.is-selected .ao-cf-item-check {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

/* Thumbnail */
.ao-cf-item-thumb {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    margin: 8px auto 10px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ao-cf-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ao-cf-item-thumb .ao-cf-no-img {
    color: #9ca3af;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ao-cf-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
}

.ao-cf-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #059669;
    margin-top: auto;
    direction: rtl;
}

.ao-cf-item-card.is-selected .ao-cf-item-price {
    color: #1d4ed8;
}

/* =========================================
   Bottom Pre-Invoice Card (Under all sections)
   ========================================= */
.ao-cf-bottom-invoice-wrapper {
    width: 100%;
    margin-top: 20px;
}

.ao-cf-invoice-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 26px 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Rate Loading Toast Bar (Sticky at top) */
.ao-cf-rate-toast {
    position: sticky;
    top: 20px;
    z-index: 999;
    margin-bottom: 20px;
    animation: aoCfSlideDown 0.25s ease-out;
}

@keyframes aoCfSlideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes aoCfSlideUpMobile {
    from { transform: translateY(35px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ao-cf-toast-inner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25), 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ao-cf-toast-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: aoCfSpin 0.75s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

/* Large Prominent Loading Overlay on Invoice */
.ao-cf-invoice-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    animation: aoCfFadeIn 0.2s ease-in-out;
}

.ao-cf-loading-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 440px;
}

.ao-cf-spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: aoCfSpin 0.75s linear infinite;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

@keyframes aoCfSpin {
    to { transform: rotate(360deg); }
}

@keyframes aoCfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ao-cf-loading-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.ao-cf-loading-desc {
    font-size: 13.5px;
    color: #475569;
    margin: 0;
    line-height: 1.7;
}

/* Busy loading state: Lock item clicks to prevent conflict/rapid clicking while rate is being queried */
.ao-cf-wrapper.ao-cf-busy-loading .ao-cf-item-card {
    pointer-events: none !important;
    cursor: wait !important;
    opacity: 0.65;
    filter: grayscale(15%);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.ao-cf-wrapper.ao-cf-busy-loading .ao-cf-btn-checkout {
    pointer-events: none !important;
    opacity: 0.65;
}

.ao-cf-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 15px;
}

.ao-cf-invoice-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ao-cf-invoice-badge-icon {
    font-size: 24px;
    line-height: 1;
}

.ao-cf-invoice-main-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.ao-cf-invoice-progress {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ao-cf-invoice-progress-bar-wrap {
    width: 120px;
    height: 8px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    display: inline-block;
}

.ao-cf-invoice-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Invoice Grid (2 Columns: Items list & Currency breakdown) */
.ao-cf-invoice-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 22px;
}

.ao-cf-grid-heading {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Selected Items List */
.ao-cf-selected-list {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    min-height: 240px;
    max-height: 320px;
    overflow-y: auto;
}

.ao-cf-selected-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease;
}

.ao-cf-selected-item:hover {
    transform: translateX(-2px);
    border-color: #cbd5e1;
}

.ao-cf-selected-item-info {
    flex: 1;
    min-width: 0;
}

.ao-cf-selected-item-sec {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
}

.ao-cf-selected-item-name {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ao-cf-selected-item-price {
    font-weight: 700;
    color: #2563eb;
    margin-right: 12px;
    direction: rtl;
    white-space: nowrap;
    font-size: 13.5px;
}

.ao-cf-empty-selection {
    text-align: center;
    padding: 40px 15px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* Breakdown by Currency */
.ao-cf-breakdown-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
}

.ao-cf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}

.ao-cf-summary-row:last-child {
    border-bottom: none;
}

.ao-cf-summary-row strong {
    color: #0f172a;
    font-weight: 600;
    direction: rtl;
}

.ao-cf-sub-rate {
    font-size: 11px;
    color: #64748b;
    font-weight: normal;
    margin-right: 4px;
}

.ao-cf-highlight-row {
    background: #eff6ff;
    padding: 8px 12px !important;
    border-radius: 8px;
    margin: 6px 0;
    border-bottom: none !important;
}

.ao-cf-highlight-row span {
    font-weight: 600;
    color: #1e40af;
}

.ao-cf-highlight-row strong {
    color: #1d4ed8;
    font-weight: 700;
}

/* Invoice Bottom Bar */
.ao-cf-invoice-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 24px;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 16px;
}

.ao-cf-grand-total-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ao-cf-grand-total-label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.ao-cf-grand-total-val {
    font-size: 22px;
    font-weight: 800;
    color: #059669;
    direction: rtl;
}

.ao-cf-invoice-action-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Shared button sizing & styling */
.ao-cf-btn-checkout,
.ao-cf-btn-consultation {
    border: none;
    border-radius: 10px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 700;
    min-height: 48px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
}

/* Green Checkout Button */
.ao-cf-btn-checkout {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.ao-cf-btn-checkout:hover:not(:disabled):not(.is-disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.ao-cf-btn-checkout:active:not(:disabled):not(.is-disabled) {
    transform: translateY(1px);
}

/* Yellow / Amber Consultation Button */
.ao-cf-btn-consultation {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.ao-cf-btn-consultation:hover:not(:disabled):not(.is-disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.ao-cf-btn-consultation:active:not(:disabled):not(.is-disabled) {
    transform: translateY(1px);
}

.ao-cf-btn-checkout:disabled,
.ao-cf-btn-checkout.is-disabled,
.ao-cf-btn-consultation:disabled,
.ao-cf-btn-consultation.is-disabled {
    background: #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    color: #94a3b8 !important;
    transform: none !important;
}

.ao-cf-wrapper.ao-cf-busy-loading .ao-cf-btn-checkout,
.ao-cf-wrapper.ao-cf-busy-loading .ao-cf-btn-consultation,
.ao-cf-wrapper.ao-cf-action-cooldown .ao-cf-btn-checkout,
.ao-cf-wrapper.ao-cf-action-cooldown .ao-cf-btn-consultation {
    pointer-events: none !important;
    opacity: 0.85;
}

/* Consultation Modal */
.ao-cf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

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

.ao-cf-modal-box {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    animation: aoCfFadeIn 0.25s ease-out;
}

.ao-cf-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ao-cf-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ao-cf-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ao-cf-modal-icon {
    font-size: 24px;
}

.ao-cf-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.ao-cf-modal-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 18px 0;
}

.ao-cf-modal-form-wrap {
    margin-top: 10px;
}

.ao-cf-modal-box #mlr_form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
}

.ao-cf-modal-box #mlr_form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ao-cf-modal-box #mlr_notice {
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.6;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.ao-cf-modal-box #mlr_message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
    display: none;
    line-height: 1.6;
}

.ao-cf-modal-box #mlr_message.show {
    display: block;
}

.ao-cf-modal-box #mlr_message.mlr-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.ao-cf-modal-box #mlr_message.mlr-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.ao-cf-modal-box #mlr_identifier,
.ao-cf-modal-box #sb_mlr_sms_code,
.ao-cf-modal-box #mlr_profile_step input {
    width: 100% !important;
    height: 44px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    margin-bottom: 12px !important;
    text-align: center;
}

.ao-cf-modal-box #mlr_identifier:focus,
.ao-cf-modal-box #sb_mlr_sms_code:focus,
.ao-cf-modal-box #mlr_profile_step input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.ao-cf-modal-box #sb_mlr_send_code,
.ao-cf-modal-box #sb_mlr_verify_code,
.ao-cf-modal-box #sb_mlr_submit_profile {
    width: 100% !important;
    height: 44px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border: none !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.ao-cf-modal-box #sb_mlr_send_code:hover,
.ao-cf-modal-box #sb_mlr_verify_code:hover,
.ao-cf-modal-box #sb_mlr_submit_profile:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
}

.ao-cf-modal-box #sb_mlr_resend_code {
    width: 100% !important;
    height: 38px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    margin-top: 10px !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: pointer !important;
}

.ao-cf-modal-box #mlr_timer {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: 10px 0;
}

/* Red Mandatory Warning Notice below checkout button */
.ao-cf-unselected-warning {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    border-radius: 10px;
    padding: 12px 18px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #991b1b;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
    animation: aoCfFadeIn 0.2s ease-in-out;
}

.ao-cf-warning-icon {
    font-size: 22px;
    color: #dc2626;
    line-height: 1;
    flex-shrink: 0;
}

.ao-cf-missing-sections-list {
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    margin-top: 4px;
}

/* Item Card Custom Badge & Hidden Price */
.ao-cf-custom-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid #bfdbfe;
    display: inline-block;
}

.ao-cf-user-text-badge {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-block;
}

.ao-cf-price-hidden {
    display: none !important;
}

/* Dedicated Item Description Box under section */
.ao-cf-section-desc-box {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    animation: aoCfFadeIn 0.2s ease-in-out;
}

.ao-cf-desc-icon {
    color: #2563eb;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
}

.ao-cf-desc-text {
    white-space: pre-line;
    line-height: 1.8;
}

/* More Info Link inside description box (Bold & Red) */
.ao-cf-more-info-link {
    display: inline-block;
    color: #dc2626 !important;
    font-weight: 800 !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    margin-right: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ao-cf-more-info-link:hover {
    color: #991b1b !important;
    text-decoration: underline !important;
    transform: translateX(-2px);
}

/* Swiper Swipe Hint (ورق بزنید) under section carousel */
.ao-cf-section .ao-swiper-swipe-hint {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 14.5px;
    color: #334155;
    font-weight: 600;
    letter-spacing: -0.2px;
    user-select: none;
}

@media (max-width: 768px) {
    .ao-cf-section .ao-swiper-swipe-hint {
        margin-top: 10px;
        margin-bottom: 6px;
        font-size: 13.5px;
    }
}

/* Interactive User Text Input Box */
.ao-cf-user-text-box {
    margin-top: 14px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-right: 4px solid #0284c7;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: aoCfFadeIn 0.2s ease-in-out;
}

.ao-cf-user-text-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ao-cf-user-text-icon {
    color: #0284c7;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ao-cf-user-text-title-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    cursor: default;
}

.ao-cf-user-text-input-wrap {
    width: 100%;
}

.ao-cf-user-text-textarea {
    width: 100%;
    min-height: 58px;
    height: 58px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    resize: vertical;
    box-sizing: border-box;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
}

.ao-cf-user-text-textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    background: #ffffff;
}

.ao-cf-user-text-textarea.is-invalid {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* User text preview in invoice list */
.ao-cf-selected-item-user-text {
    font-size: 11.5px;
    color: #475569;
    margin-top: 4px;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    border-right: 3px solid #0284c7;
    line-height: 1.5;
    word-break: break-word;
}

.ao-cf-selected-item-user-text .ao-cf-ut-label {
    font-weight: 600;
    color: #1e293b;
    margin-left: 4px;
}

/* Interactive Custom Amount Box */
.ao-cf-custom-amount-box {
    margin-top: 14px;
    background: #f0f7ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.06);
    animation: aoCfFadeIn 0.2s ease-in-out;
}

.ao-cf-custom-amount-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ao-cf-custom-amount-icon {
    font-size: 18px;
}

.ao-cf-custom-amount-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e3a8a;
}

.ao-cf-custom-amount-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ao-cf-curr-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ao-cf-curr-tab {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.ao-cf-curr-tab:hover {
    border-color: #3b82f6;
    color: #2563eb;
}

.ao-cf-curr-tab.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.ao-cf-amount-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 240px;
    flex: 1;
}

.ao-cf-custom-amount-input {
    width: 100%;
    padding: 8px 12px 8px 50px;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ao-cf-custom-amount-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ao-cf-amount-curr-badge {
    position: absolute;
    left: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
    direction: ltr;
}

.ao-cf-fee-notice {
    margin-top: 10px;
    font-size: 12.5px;
    color: #1e40af;
    background: #ffffff;
    border: 1px dashed #93c5fd;
    border-radius: 6px;
    padding: 6px 12px;
    display: inline-block;
}

/* Shake Animation when attempting to checkout with missing sections */
@keyframes aoCfShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.ao-cf-section.ao-cf-section-shake {
    animation: aoCfShake 0.4s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

/* Alert Notification */
.ao-cf-notice {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    display: none;
}

.ao-cf-notice-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ao-cf-notice-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ao-cf-notice-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Responsive Mobile-First Optimizations */
@media (max-width: 860px) {
    .ao-cf-invoice-content-grid {
        grid-template-columns: 1fr;
    }

    .ao-cf-invoice-bottom-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .ao-cf-grand-total-wrap {
        justify-content: space-between;
    }

    .ao-cf-invoice-action-wrap {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Floating Rate Toast on Mobile (Fixed at bottom of screen) */
    .ao-cf-rate-toast {
        position: fixed !important;
        bottom: 16px !important;
        top: auto !important;
        left: 12px !important;
        right: 12px !important;
        margin: 0 auto !important;
        max-width: 420px !important;
        z-index: 99999 !important;
        animation: aoCfSlideUpMobile 0.25s ease-out !important;
    }

    .ao-cf-toast-inner {
        padding: 12px 18px !important;
        font-size: 13px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.2) !important;
        background: linear-gradient(135deg, #0f172a, #1e293b) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .ao-cf-toast-spinner {
        width: 18px !important;
        height: 18px !important;
        border-width: 2.5px !important;
    }

    .ao-cf-wrapper {
        margin: 10px auto;
        padding: 0 4px;
    }

    .ao-cf-section {
        padding: 12px 10px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .ao-cf-section-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
        gap: 8px;
    }

    .ao-cf-section-header-right {
        min-width: auto;
        gap: 8px;
    }

    .ao-cf-section-badge {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .ao-cf-section-title {
        font-size: 14px;
    }

    .ao-cf-section-status {
        font-size: 11px;
        padding: 2px 8px;
    }

    .ao-cf-nav-btn {
        width: 26px !important;
        height: 26px !important;
        border-radius: 6px !important;
    }

    .ao-cf-nav-btn svg {
        width: 12px;
        height: 12px;
    }

    /* Cards on mobile: perfectly proportioned, undeformed */
    .ao-cf-item-card {
        min-height: 142px !important;
        padding: 8px 6px !important;
        border-radius: 10px !important;
    }

    .ao-cf-item-thumb {
        width: 48px !important;
        height: 48px !important;
        margin: 2px auto 6px !important;
        border-radius: 6px !important;
    }

    .ao-cf-item-thumb .ao-cf-no-img {
        font-size: 20px !important;
    }

    .ao-cf-item-title {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
        min-height: 32px !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
    }

    .ao-cf-item-price {
        font-size: 11.5px !important;
        font-weight: 700 !important;
    }

    .ao-cf-custom-badge {
        font-size: 10px !important;
        padding: 1px 5px !important;
    }

    .ao-cf-item-check {
        top: 5px !important;
        right: 5px !important;
        width: 17px !important;
        height: 17px !important;
        font-size: 10px !important;
    }

    /* Description box on mobile */
    .ao-cf-section-desc-box {
        padding: 10px 12px !important;
        font-size: 12px !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
    }

    /* Custom amount box on mobile */
    .ao-cf-custom-amount-box {
        padding: 12px 10px !important;
        margin-top: 10px !important;
        border-radius: 10px !important;
    }

    .ao-cf-custom-amount-title {
        font-size: 12.5px !important;
    }

    .ao-cf-custom-amount-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .ao-cf-curr-tabs {
        display: flex !important;
        width: 100% !important;
        gap: 4px !important;
    }

    .ao-cf-curr-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    .ao-cf-amount-input-wrap {
        max-width: 100% !important;
        width: 100% !important;
    }

    .ao-cf-custom-amount-input {
        padding: 7px 10px 7px 46px !important;
        font-size: 14px !important;
    }

    .ao-cf-fee-notice {
        font-size: 11.5px !important;
        padding: 6px 8px !important;
    }

    /* Bottom invoice on mobile */
    .ao-cf-invoice-card {
        padding: 14px 12px !important;
        border-radius: 12px !important;
    }

    .ao-cf-invoice-header {
        padding-bottom: 12px !important;
        margin-bottom: 14px !important;
    }

    .ao-cf-invoice-main-title {
        font-size: 16px !important;
    }

    .ao-cf-invoice-badge-icon {
        font-size: 20px !important;
    }

    .ao-cf-invoice-progress {
        font-size: 11px !important;
    }

    .ao-cf-invoice-progress-bar-wrap {
        width: 90px !important;
        height: 6px !important;
    }

    .ao-cf-selected-list {
        padding: 8px !important;
        min-height: auto !important;
        max-height: 220px !important;
    }

    .ao-cf-selected-item {
        padding: 7px 10px !important;
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }

    .ao-cf-selected-item-sec {
        font-size: 10px !important;
    }

    .ao-cf-selected-item-name {
        font-size: 11.5px !important;
    }

    .ao-cf-selected-item-price {
        font-size: 12px !important;
    }

    .ao-cf-breakdown-box {
        padding: 10px 12px !important;
    }

    .ao-cf-summary-row {
        font-size: 12px !important;
        padding: 5px 0 !important;
    }

    .ao-cf-invoice-bottom-bar {
        padding: 12px 14px !important;
        gap: 10px !important;
        border-radius: 10px !important;
    }

    .ao-cf-grand-total-label {
        font-size: 13.5px !important;
    }

    .ao-cf-grand-total-val {
        font-size: 18px !important;
    }

    .ao-cf-invoice-action-wrap {
        width: 100% !important;
        flex-direction: column !important;
    }

    .ao-cf-btn-checkout,
    .ao-cf-btn-consultation {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }

    .ao-cf-unselected-warning {
        padding: 10px 12px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   User Text Input Fields Section Mode (Unlimited text inputs without cards)
   ========================================================================== */
.ao-cf-user-fields-wrap {
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 12px;
}

.ao-cf-user-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
}

.ao-cf-user-field-group {
    display: flex;
    flex-direction: column;
}

.ao-cf-user-field-group.ao-cf-field-fullwidth {
    grid-column: 1 / -1;
}

.ao-cf-user-field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.ao-cf-field-req-star {
    color: #ef4444;
    font-size: 14px;
    font-weight: 700;
}

.ao-cf-user-field-input-wrap {
    position: relative;
    width: 100%;
}

.ao-cf-user-field-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ao-cf-user-field-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ao-cf-user-field-input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.ao-cf-user-field-input.is-invalid {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.ao-cf-user-field-textarea {
    resize: vertical;
    min-height: 85px;
    line-height: 1.6;
}

/* Fields Breakdown in Invoice */
.ao-cf-selected-item.ao-cf-selected-item-fields-type {
    align-items: flex-start;
}

.ao-cf-selected-item-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ao-cf-field-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.5;
}

.ao-cf-field-pill strong {
    color: #1e3a8a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ao-cf-user-fields-wrap {
        padding: 14px 16px;
    }

    .ao-cf-user-fields-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ao-cf-user-field-group.ao-cf-field-fullwidth {
        grid-column: auto;
    }

    .ao-cf-user-field-input {
        padding: 9px 12px;
        font-size: 13.5px;
    }

    .ao-cf-user-field-label {
        font-size: 12.5px;
        margin-bottom: 6px;
    }
}

/* ==========================================================================
   Embedded Mode & Isolated Single Item Mode (Single Product Page Integration)
   ========================================================================== */
.ao-cf-embedded-mode {
    margin-top: 10px;
    margin-bottom: 20px;
}

.ao-cf-section-hidden-prev {
    display: none !important;
}

.ao-cf-section-isolated-mode .ao-cf-swiper-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ao-cf-section-isolated-mode .ao-cf-swiper {
    overflow: visible !important;
    max-width: 340px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.ao-cf-section-isolated-mode .swiper-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transform: none !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

.ao-cf-section-isolated-mode .ao-cf-sibling-hidden {
    display: none !important;
}

.ao-cf-section-isolated-mode .ao-cf-isolated-item-slide {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    flex: 0 0 auto !important;
}

.ao-cf-section-isolated-mode .ao-cf-item-card {
    border-color: #2563eb !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.16) !important;
}

.ao-cf-section-isolated-mode .ao-swiper-swipe-hint {
    display: none !important;
}


/* Override Elementor container for embedded custom form */
.elementor-element.elementor-element-d169b3d.ao-embedded-product-cf-top,
.ao-embedded-product-cf-top {
    display: block !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin: 20px auto 35px auto !important;
    padding: 0 !important;
}

.ao-embedded-product-cf-top .ao-product-cf-container {
    width: 100% !important;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}


/* Universal Elementor overrides when embedded custom form is present */
.single-product .ao-embedded-product-cf-top,
.single-product .ao-embedded-product-cf-top.e-con,
.single-product .elementor-element.ao-embedded-product-cf-top {
    display: block !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin: 20px auto 35px auto !important;
    padding: 0 !important;
    float: none !important;
}

.ao-embedded-product-cf-top .ao-product-cf-container {
    width: 100% !important;
}

/* Hide old purchase box elements when custom form is embedded */
.single-product .ao-single-order-form,
.single-product .ao-spo-submit,
.single-product .ao-spo-loading-overlay {
    display: none !important;
}
