/* ══════════════════════════════════════════════════════════════════
   includes/order-form/assets/css/order-form-extra.css
   عناصر إضافية لمنصة الريحان (تُضاف بعد order-form.css)
══════════════════════════════════════════════════════════════════ */

/* الحاوية الرئيسية */
#of-checkout {
    position: relative;
    padding: 20px;
    border: 2px solid var(--of-c, #4C3BCF);
    border-radius: 12px;
    margin-top: 16px;
    background: white;
}

/* الحقول */
#of-form input,
#of-form select,
#of-form textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    margin-bottom: 9px;
    appearance: none;
    -webkit-appearance: none;
}

#of-form input:focus,
#of-form select:focus,
#of-form textarea:focus {
    border-color: var(--of-c, #4C3BCF);
    background: white;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--of-c, #4C3BCF) 15%, transparent);
}

/* حقل مع أيقونة */
.of-field-row {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 14px;
    margin-bottom: 9px;
    transition: border-color .2s;
}
.of-field-row:focus-within {
    border-color: var(--of-c, #4C3BCF);
    background: white;
}
.of-icon { font-size: 16px; padding: 12px 10px 12px 0; flex-shrink: 0; }
.of-field-row select,
.of-field-row textarea {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 12px 0;
}

/* عنوان القسم */
.of-section-label {
    font-size: 12px;
    font-weight: 800;
    color: #374151;
    margin-bottom: 8px;
    margin-top: 4px;
}

/* شركات التوصيل */
#of-providers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.of-provider-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #f9fafb;
}
.of-provider-card.active {
    border-color: var(--of-c, #4C3BCF);
    background: color-mix(in srgb, var(--of-c, #4C3BCF) 6%, white);
}
.of-provider-radio {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: border-color .2s;
}
.of-provider-card.active .of-provider-radio {
    border-color: var(--of-c, #4C3BCF);
}
.of-provider-radio-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--of-c, #4C3BCF);
    display: none;
}
.of-provider-card.active .of-provider-radio-dot { display: block; }
.of-provider-name { font-size: 14px; font-weight: 800; flex: 1; }

/* نوع التوصيل */
.of-dtype-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.of-dtype {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: border-color .2s, background .2s;
}
.of-dtype.active {
    border-color: var(--of-c, #4C3BCF);
    background: color-mix(in srgb, var(--of-c, #4C3BCF) 6%, white);
}
.of-dtype.disabled { opacity: .35; pointer-events: none; display: none; }
.of-dtype-icon { font-size: 20px; margin-bottom: 2px; }
.of-dtype-name { font-size: 12px; font-weight: 800; }

/* الكمية */
.of-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.of-qty-label { font-size: 13px; font-weight: 700; color: #374151; }
.of-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.of-qty-ctrl button {
    width: 36px; height: 36px;
    border: none;
    background: #f9fafb;
    font-size: 18px;
    cursor: pointer;
    color: #374151;
}
#of-qty {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    padding: 0 8px;
}

/* ملخص السعر */
.of-total-box {
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 13px;
}
.of-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.of-total-row:last-child { border-bottom: none; }
.of-total-final {
    font-size: 16px;
    font-weight: 900;
    color: var(--of-c, #4C3BCF);
    padding-top: 8px;
    margin-top: 4px;
}

/* زر الإرسال */
#of-submit {
    width: 100%;
    background: var(--of-c, #4C3BCF);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--of-c, #4C3BCF) 40%, transparent);
    transition: opacity .2s;
}
#of-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Trust */
.of-trust {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 11px;
    color: #9ca3af;
}

/* Alert */
#of-alert {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#of-alert.show { display: flex; }
.of-alert-box {
    background: white;
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 300px;
    width: 100%;
    text-align: center;
}
.of-alert-icon { font-size: 44px; margin-bottom: 12px; }
#of-alert-msg  { font-size: 16px; font-weight: 700; color: #1a1a1a; line-height: 1.6; }
#of-alert-ok   {
    background: var(--of-c, #4C3BCF);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
}

/* Modal صفحة الشكر */
#of-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    overflow-y: auto;
    background: #080e1a;
}

/* Responsive */
@media (max-width: 480px) {
    #of-checkout { padding: 14px 12px; }
}
