/* ===== RESPECT RP — GLOBAL DESIGN FIXES ===== */
/* يُضاف في جميع الصفحات لتوحيد التصميم */

/* ===== SELECT ELEMENTS ===== */
select,
select.form-input,
.form-input[type="select"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.04) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 0.85rem center !important;
    background-size: 16px !important;
    border: 1px solid rgba(92, 45, 176, 0.25) !important;
    border-radius: 12px !important;
    color: #f0ebff !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.88rem !important;
    padding: 0.65rem 0.95rem 0.65rem 2.5rem !important;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    outline: none;
}

select:focus,
select.form-input:focus {
    border-color: #7c3aed !important;
    background-color: rgba(124, 58, 237, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

select:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
}

select option {
    background-color: #1e1035 !important;
    color: #f0ebff !important;
    padding: 0.5rem !important;
    font-family: 'Cairo', sans-serif !important;
}

select option:checked,
select option:hover {
    background: linear-gradient(135deg, #4c2494, #7c3aed) !important;
    color: #fff !important;
}

/* ===== INPUT ENHANCEMENTS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(92, 45, 176, 0.25);
    border-radius: 12px;
    color: #f0ebff;
    font-family: 'Cairo', sans-serif;
    transition: all 0.25s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #7c3aed;
    background-color: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #7a6a9a;
}

/* Number input — إخفاء الـ spinner الافتراضي وإضافة تصميم مخصص */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* wrapper للـ number input مع أزرار + / - مخصصة */
.num-input-wrap {
    display: flex;
    align-items: stretch;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(92,45,176,.25);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}
.num-input-wrap:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.num-input-wrap input[type="number"] {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    text-align: center !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: .65rem .25rem !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
    color: #f0ebff !important;
    font-family: 'Cairo', sans-serif !important;
    -webkit-text-fill-color: #f0ebff !important;
    opacity: 1 !important;
    display: block !important;
    overflow: hidden !important;
}
.num-input-wrap input[type="number"]:focus {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #f0ebff !important;
    -webkit-text-fill-color: #f0ebff !important;
}
.num-btn {
    width: 38px;
    flex-shrink: 0;
    background: rgba(124,58,237,.08);
    border: none;
    border-left: 1px solid rgba(92,45,176,.2);
    color: #8b5cf6;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .18s, color .18s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    user-select: none;
}
.num-btn:first-child {
    border-left: none;
    border-right: 1px solid rgba(92,45,176,.2);
}
.num-btn:hover {
    background: rgba(124,58,237,.22);
    color: #c4b5fd;
}
.num-btn:active {
    background: rgba(124,58,237,.35);
    color: #fff;
}

/* ===== CHECKBOX CUSTOM ===== */
input[type="checkbox"] {
    accent-color: #7c3aed;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(91,45,176,0.6); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7c3aed; }
::-webkit-scrollbar-corner { background: transparent; }
html { scrollbar-width: thin; scrollbar-color: rgba(91,45,176,0.6) transparent; }
body { overflow-x: hidden; }

/* ===== MODAL BACKDROP ===== */
.modal-ov,
.modal-overlay {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* ===== CARD HOVER GLOW ===== */
.prod-card:hover,
.feat-card:hover,
.stat-card:hover,
.order-card:hover {
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.4), 0 8px 32px rgba(124, 58, 237, 0.2) !important;
}

/* ===== BUTTON RIPPLE ===== */
.btn-primary,
.btn-submit,
.btn-next,
.modal-buy-btn {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.btn-submit::after,
.btn-next::after,
.modal-buy-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover::after,
.btn-submit:hover::after,
.btn-next:hover::after,
.modal-buy-btn:hover::after {
    opacity: 1;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.6);
    outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(124, 58, 237, 0.35);
    color: #f0ebff;
}

/* ===== SMOOTH TRANSITIONS ===== */
a, button {
    transition: all 0.25s ease;
}

/* ===== RENEW MODAL SELECT FIX ===== */
#renew_months {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 0.85rem center !important;
    background-size: 16px !important;
    border: 1px solid rgba(92, 45, 176, 0.25) !important;
    border-radius: 12px !important;
    color: #f0ebff !important;
    padding-left: 2.5rem !important;
}

/* ===== PAGE TRANSITIONS ===== */
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-hero,
.page-wrap,
.activation-section {
    animation: pageIn 0.5s ease both;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    select,
    select.form-input {
        font-size: 0.9rem !important;
        padding: 0.7rem 0.9rem 0.7rem 2.5rem !important;
    }
}

/* ===== PRICE INPUT — حقل السعر في لوحة الإدارة ===== */
.price-inp {
    width: 80px !important;
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(92,45,176,.25) !important;
    border-radius: 8px !important;
    padding: .3rem .5rem !important;
    color: #f0ebff !important;
    -webkit-text-fill-color: #f0ebff !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: .82rem !important;
    outline: none !important;
    text-align: center !important;
    transition: border-color .2s !important;
    flex-shrink: 0 !important;
}
.price-inp:focus {
    border-color: #7c3aed !important;
    background: rgba(124,58,237,.08) !important;
}
/* منع الـ wrapper من التطبيق على price-inp */
.price-inp.num-input-wrap,
input.price-inp[data-wrapped] {
    all: unset;
}
/* لو الـ wrapper اتطبق على price-inp، أخفيه وأظهر الـ input مباشرة */
.num-input-wrap:has(> .price-inp) {
    display: contents !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}
.num-input-wrap:has(> .price-inp) .num-btn {
    display: none !important;
}
.num-input-wrap:has(> .price-inp) .price-inp {
    width: 80px !important;
    flex: none !important;
}

/* ===== PHONE COUNTRY SELECT — مخفي دائماً (يُستبدل بـ dropdown مخصص) ===== */
select[data-phone-code],
select[data-ph-done] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* ===== CUSTOM SELECT DROPDOWN ===== */
.rrp-sel-wrap .rrp-sel-btn:hover {
    border-color: rgba(124,58,237,.5) !important;
    background: rgba(124,58,237,.06) !important;
}
.rrp-sel-wrap .rrp-sel-list::-webkit-scrollbar { width: 4px; }
.rrp-sel-wrap .rrp-sel-list::-webkit-scrollbar-track { background: transparent; }
.rrp-sel-wrap .rrp-sel-list::-webkit-scrollbar-thumb { background: rgba(124,58,237,.4); border-radius: 2px; }
.rrp-sel-wrap .rrp-sel-list::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,.7); }
