/* ==========================================================================
   Travilista B2B — Supplier Registration Wizard
   --------------------------------------------------------------------------
   Styling for the multi-step supplier onboarding experience (account, legal
   entity, supplier type, details, documents, review & pending verification).
   Built on top of the AdminLTE/Bootstrap design system and the Travilista
   brand tokens defined in brand.css (--tv-brand, --tv-brand-gradient, ...).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page shell
   -------------------------------------------------------------------------- */
.reg-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(var(--tv-brand-rgb), 0.08), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(var(--tv-brand-rgb), 0.06), transparent 55%),
        var(--bs-body-bg);
}

.reg-topbar {
    padding: 0.9rem clamp(1rem, 4vw, 3rem);
}

.reg-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reg-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.reg-brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1.15rem;
    background: var(--tv-brand-gradient);
    box-shadow: 0 6px 14px rgba(var(--tv-brand-rgb), 0.35);
}

.reg-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
    color: var(--bs-body-color);
}

.reg-topbar-hint {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.reg-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem clamp(0.75rem, 3vw, 2.5rem) 3rem;
}

.reg-shell {
    width: 100%;
    max-width: 1100px;
    animation: reg-fade-up 0.45s ease both;
}

/* --------------------------------------------------------------------------
   2. Card & brand pane
   -------------------------------------------------------------------------- */
.reg-card {
    display: flex;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);
    background: var(--bs-body-bg);
}

.reg-brand {
    flex: 0 0 340px;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem 2rem;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 45%),
        var(--tv-brand-gradient);
    position: relative;
}

/* Subtle dotted texture (pure CSS — no image assets needed) */
.reg-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.35;
    pointer-events: none;
}

.reg-brand-body {
    position: relative;
    z-index: 1;
}

.reg-brand-title {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.9rem;
}

.reg-brand-text {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
}

.reg-brand-points {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reg-brand-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.92);
}

.reg-brand-points i {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.reg-brand-foot {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1rem;
}

.reg-content {
    flex: 1;
    min-width: 0;
}

.reg-content-inner {
    padding: 1.75rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
}

.reg-signin-hint {
    margin-top: 1.4rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   3. Stepper
   -------------------------------------------------------------------------- */
.reg-stepper {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0 0 2rem;
    padding: 0 0 1.25rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.reg-step {
    flex: 1 0 auto;
    min-width: 96px;
}

.reg-step-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--bs-secondary-color);
    position: relative;
    padding: 0 0.35rem;
}

/* Connector line */
.reg-step:not(:first-child) .reg-step-link::before {
    content: "";
    position: absolute;
    top: 1rem;
    inset-inline-end: calc(50% + 1.35rem);
    width: calc(100% - 2.7rem);
    height: 2px;
    background: var(--bs-border-color);
    border-radius: 2px;
}

.reg-step.done:not(:first-child) .reg-step-link::before {
    background: var(--tv-brand);
}

.reg-step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    transition: all 0.2s ease;
    z-index: 1;
}

.reg-step.done .reg-step-dot,
.reg-step.active .reg-step-dot {
    background: var(--tv-brand);
    border-color: var(--tv-brand);
    color: #fff;
}

.reg-step.active .reg-step-dot {
    box-shadow: 0 0 0 5px rgba(var(--tv-brand-rgb), 0.15);
}

.reg-step.active .reg-step-link {
    color: var(--bs-emphasis-color);
    font-weight: 600;
}

.reg-step-label {
    font-size: 0.72rem;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4. Headings & forms
   -------------------------------------------------------------------------- */
.reg-heading {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.reg-subheading {
    color: var(--bs-secondary-color);
    margin-bottom: 1.75rem;
}

.reg-form-hint {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.reg-required-note {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/* Password strength meter */
.reg-strength {
    height: 5px;
    border-radius: 3px;
    background: var(--bs-border-color-translucent);
    overflow: hidden;
    margin-top: 0.4rem;
}

.reg-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.reg-strength-bar.s-weak { width: 33%; background: var(--bs-danger); }
.reg-strength-bar.s-medium { width: 66%; background: var(--bs-warning); }
.reg-strength-bar.s-strong { width: 100%; background: var(--bs-success); }

/* --------------------------------------------------------------------------
   5. Choice cards (radio cards)
   -------------------------------------------------------------------------- */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.choice-card {
    position: relative;
    display: block;
    border: 2px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 1.25rem 1.1rem;
    cursor: pointer;
    background: var(--bs-body-bg);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.choice-card:hover {
    border-color: rgba(var(--tv-brand-rgb), 0.55);
    transform: translateY(-2px);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card-icon {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--tv-brand);
    background: rgba(var(--tv-brand-rgb), 0.09);
    margin-bottom: 0.8rem;
    transition: all 0.18s ease;
}

.choice-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.choice-card-desc {
    color: var(--bs-secondary-color);
    font-size: 0.83rem;
    line-height: 1.45;
    margin: 0;
}

.choice-card .choice-check {
    position: absolute;
    top: 0.8rem;
    inset-inline-end: 0.8rem;
    color: var(--tv-brand);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.18s ease;
}

.choice-card:has(input:checked) {
    border-color: var(--tv-brand);
    box-shadow: 0 8px 22px rgba(var(--tv-brand-rgb), 0.18);
}

.choice-card:has(input:checked) .choice-check {
    opacity: 1;
    transform: scale(1);
}

.choice-card:has(input:checked) .choice-card-icon {
    background: var(--tv-brand);
    color: #fff;
}

.choice-card:has(input:focus-visible) {
    outline: 3px solid rgba(var(--tv-brand-rgb), 0.4);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   6. Wizard footer navigation
   -------------------------------------------------------------------------- */
.reg-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.reg-nav .btn {
    min-width: 132px;
    border-radius: 0.7rem;
    padding: 0.62rem 1.25rem;
}

.btn-reg-primary {
    background: var(--tv-brand-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(var(--tv-brand-rgb), 0.3);
}

.btn-reg-primary:hover:not(:disabled) {
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 10px 22px rgba(var(--tv-brand-rgb), 0.38);
}

.btn-reg-primary:disabled {
    opacity: 0.65;
}

/* --------------------------------------------------------------------------
   7. Review page
   -------------------------------------------------------------------------- */
.review-section {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--bs-tertiary-bg);
}

.review-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.review-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--tv-brand);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.review-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.28rem 0;
    font-size: 0.9rem;
}

.review-row .review-label {
    flex: 0 0 190px;
    color: var(--bs-secondary-color);
}

.review-row .review-value {
    font-weight: 600;
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   8. Document cards
   -------------------------------------------------------------------------- */
.doc-card {
    border: 2px dashed var(--bs-border-color);
    border-radius: 1rem;
    padding: 1.15rem 1.2rem;
    margin-bottom: 1rem;
    background: var(--bs-body-bg);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.doc-card.required { border-style: solid; }

.doc-card.dragover {
    border-color: var(--tv-brand);
    background: rgba(var(--tv-brand-rgb), 0.05);
}

.doc-card.has-file {
    border-style: solid;
    border-color: rgba(25, 135, 84, 0.55);
}

.doc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.doc-card-icon {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--tv-brand);
    background: rgba(var(--tv-brand-rgb), 0.09);
}

.doc-card-title {
    font-weight: 700;
    margin: 0;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-card-desc {
    color: var(--bs-secondary-color);
    font-size: 0.83rem;
    margin: 0.15rem 0 0;
}

.doc-card-body { margin-top: 0.9rem; }

.doc-file-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    background: rgba(25, 135, 84, 0.08);
    border: 1px solid rgba(25, 135, 84, 0.25);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.doc-file-name {
    font-weight: 600;
    word-break: break-all;
}

.doc-file-meta {
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.doc-progress {
    height: 6px;
    border-radius: 4px;
    background: var(--bs-border-color-translucent);
    overflow: hidden;
    margin-top: 0.75rem;
    display: none;
}

.doc-progress.show { display: block; }

.doc-progress-bar {
    height: 100%;
    width: 0;
    background: var(--tv-brand-gradient);
    transition: width 0.2s ease;
}

/* --------------------------------------------------------------------------
   9. Pending verification page
   -------------------------------------------------------------------------- */
.pending-hero {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.pending-hero-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.14);
    animation: reg-pulse 2.4s ease-in-out infinite;
}

.pending-next-step {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.5rem 0;
}

.pending-next-step i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   10. Animations & responsive
   -------------------------------------------------------------------------- */
@keyframes reg-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes reg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.35); }
    50% { box-shadow: 0 0 0 14px rgba(255, 193, 7, 0); }
}

@media (max-width: 991.98px) {
    .reg-card { flex-direction: column; }
    .reg-content-inner { padding-top: 1.25rem; }
}

@media (max-width: 575.98px) {
    .reg-step { min-width: 72px; }
    .reg-step-label { font-size: 0.64rem; }
    .reg-step-dot { width: 1.7rem; height: 1.7rem; font-size: 0.72rem; }
    .review-row { flex-direction: column; gap: 0.1rem; }
    .reg-nav .btn { flex: 1 1 auto; }
}

/* RTL fine-tuning */
html[dir="rtl"] .reg-step:not(:first-child) .reg-step-link::before {
    inset-inline-end: auto;
    inset-inline-start: calc(50% + 1.35rem);
}