/* public/CSS/register_salse.css — "انضم لفريقنا" (sales/affiliate registration). Builds on base.css + register.css */

/* side image: sticky on desktop, gradient fallback until public/IMG/sales.png exists */
/* desktop: public/IMG/sales_desktop.png (1215x1295) beside the form, 6/12 each. The box has the image's own ratio, so nothing is cropped or stretched;
   its width is also limited by the screen height (and by the file's native width), so it always fits the viewport and stays in view while the form scrolls */
.sales-container {
    max-width: 1800px;
    padding-inline: clamp(.75rem, 1.5vw, 2.5rem);
}

.sales-side {
    background: var(--grad-primary);
    position: sticky;
    top: 90px;
    width: min(100%, 1215px, calc((100vh - 110px) * 1215 / 1295));
    margin-inline: auto;
    min-height: 0;
    height: auto;
    aspect-ratio: 1215 / 1295;
}

.sales-side .img-sales {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.sales-side::after {
    display: none;
}

/* the picture already carries its own text: no dark overlay */
.sales-side::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .22), transparent 45%), var(--grad-primary);
}

.sales-side .side-cap {
    opacity: 1;
    transform: none;
}

.cap-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .8rem;
    margin-bottom: .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    font-weight: 700;
    font-size: .85rem;
}

.sales-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .4rem;
    padding: .3rem .9rem;
    border-radius: 999px;
    background: var(--chip);
    border: 1px solid var(--glass-border);
    color: var(--heading);
    font-weight: 700;
    font-size: .88rem;
}

.sales-title {
    font-size: clamp(2rem, 6vw, 2.6rem);
    margin-top: .8rem;
}

/* 3 motivational steps */
.steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    counter-reset: s;
}

.steps li {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: .1rem;
    padding: .8rem .4rem;
    border-radius: 14px;
    background: var(--chip);
    border: 1px solid var(--glass-border);
}

.steps i {
    font-size: 1.4rem;
    color: var(--brand-600);
}

.steps b {
    font-size: .88rem;
    color: var(--heading);
}

.steps small {
    font-size: .74rem;
    color: var(--muted);
    line-height: 1.4;
}

@media (min-width: 576px) {
    .steps b {
        font-size: 1rem;
    }

    .steps small {
        font-size: .82rem;
    }
}

/* sections */
.aff-sec {
    padding: 1.4rem 0;
    position: relative;
}

.aff-sec+.aff-sec::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 1px;
    background: var(--glass-border);
}

.aff-sec:first-of-type {
    padding-top: .2rem;
}

.aff-sec legend {
    float: none;
    width: auto;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: .8rem;
    padding: 0;
}

.aff-sec .num {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    font-size: .95rem;
}

.opt {
    color: var(--muted);
    font-weight: 600;
    font-size: .82rem;
}

.auth-card textarea.form-control {
    min-height: 105px;
    resize: vertical;
}

/* chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.chip {
    position: relative;
}

.chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.chip label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: .5rem 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    font-weight: 700;
    margin: 0;
    transition: background-color var(--t), border-color var(--t), transform var(--t);
}

.chip:hover label {
    border-color: var(--brand-400);
    transform: translateY(-1px);
}

.chip label .bi {
    color: var(--brand-600);
    font-size: 1.1rem;
}

.chip input:checked+label {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.chip input:checked+label .bi {
    color: #fff;
}

.chip input:focus-visible+label {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.chips.has-error .chip label {
    border-color: var(--danger);
}

/* payment cards with real logos */
.pay-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
}

@media (min-width: 576px) {
    .pay-chips {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pay-chips .chip label {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: .45rem;
    width: 100%;
    min-height: 116px;
    padding: .8rem .4rem;
    font-size: .88rem;
}

.pay-logo {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    padding: 0;
    overflow: hidden;
}

.pay-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pay-logo .bi {
    font-size: 1.6rem;
    color: var(--brand-600) !important;
}

.pay-logo.pay-vodafone_cash {
    padding: 6px;
}

.pay-logo.pay-vodafone_cash img {
    object-fit: contain;
}

/* Vodafone Cash keeps the original contained look */
.pay-chips .chip input:checked+label .pay-logo {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .55);
}

.pay-clear {
    margin-top: .8rem;
    background-color: transparent;
    border: 0;
    color: var(--heading);
    font: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
}

#payFields {
    animation: panelIn .25s ease both;
}

.pay-note {
    grid-column: 1 / -1;
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    padding: .7rem .9rem;
    border-radius: 12px;
    background: var(--chip);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    font-size: .88rem;
}

.pay-note .bi {
    color: var(--brand-600);
    margin-top: .2rem;
}

/* terms */
.aff-terms {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.1rem;
}

.auth-card .form-check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: 0;
    margin: 0;
}

.auth-card .form-check-input {
    float: none;
    margin: .35rem 0 0;
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid var(--input-border);
    background-color: var(--input-bg);
    cursor: pointer;
}

.auth-card .form-check-input:checked {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

.auth-card .form-check-input:focus {
    box-shadow: var(--ring);
    border-color: var(--input-focus);
}

.auth-card .form-check-input.has-error {
    border-color: var(--danger);
}

.terms-box {
    margin-top: .7rem;
    padding: .7rem 1rem;
    border-radius: 12px;
    background: var(--chip);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    font-size: .9rem;
}

.terms-box summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--heading);
}

.terms-box ul {
    margin: .6rem 0 0;
    padding-inline-start: 1.2rem;
}

.sales-submit {
    min-height: 56px;
    font-size: 1.15rem;
}

.form-err:not(:empty) {
    margin-top: .8rem;
    justify-content: center;
}

.hp {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

/* success panel */
.aff-success {
    text-align: center;
    padding: 1.2rem .2rem .6rem;
    outline: none;
    animation: panelIn .35s ease both;
}

.aff-success .ma-icon circle,
.aff-success .ma-icon path {
    stroke: #1F9D6B;
}

:root[data-theme="dark"] .aff-success .ma-icon circle,
:root[data-theme="dark"] .aff-success .ma-icon path {
    stroke: #5FD6A4;
}

.aff-success h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--heading);
    margin: .2rem 0 .4rem;
}

.lead-pending {
    color: var(--text);
    max-width: 460px;
    margin: 0 auto 1.2rem;
}

.lead-pending b {
    color: var(--heading);
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.3rem;
    max-width: 380px;
    display: grid;
    gap: .55rem;
    text-align: start;
}

.timeline li {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    border-radius: 12px;
    background: var(--chip);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    font-weight: 600;
}

.timeline i {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
}

.timeline .done {
    color: var(--text);
}

.timeline .done i {
    background: #1F9D6B;
    border-color: #1F9D6B;
    color: #fff;
}

.timeline .now {
    color: var(--heading);
    border-color: var(--brand-400);
}

.timeline .now i {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
}

.help-line {
    color: var(--muted);
    margin-bottom: .6rem;
}

.contact-row {
    display: grid;
    gap: .6rem;
    max-width: 380px;
    margin: 0 auto 1rem;
}

.back-home {
    display: inline-block;
    font-weight: 700;
    color: var(--heading);
}

/* contact buttons (success panel + alert): WhatsApp keeps its real green icon, Facebook its real blue */
.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 50px;
    padding: .6rem 1rem;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    background: var(--chip);
    border: 1.5px solid var(--glass-border);
    color: var(--heading);
    transition: transform var(--t), background-color var(--t);
}

.c-btn:hover {
    transform: translateY(-1px);
    background: rgba(193, 78, 118, .14);
    color: var(--heading);
}

.c-btn .bi,
.ma-btn .bi-whatsapp,
.ma-btn .bi-facebook {
    font-size: 1.3rem;
}

.bi-whatsapp {
    color: #25D366;
}

.bi-facebook {
    color: #1877F2;
}

.c-btn .wa-num {
    direction: ltr;
}

/* mobile/tablet picture (hidden on desktop via d-lg-none) */
.sales-img-mobile {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin: 0 0 1.2rem;
}

/* roomier form card on desktop */
@media (min-width: 992px) {
    .sales-card {
        padding: 2.5rem;
    }

    .sales-card .fgrid {
        gap: 1.1rem 1.4rem;
    }
}