/* Registration flow UI */
@font-face {
    font-family: 'Dana Medium';
    src: url('/fonts/Dana/woff2/DanaFaNum-Medium.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Dana DemiBold';
    src: url('/fonts/Dana/woff2/DanaFaNum-DemiBold.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Morabba Medium';
    src: url('/fonts/Morabba/woff2/Morabba-Medium.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Morabba Bold';
    src: url('/fonts/Morabba/woff2/Morabba-Bold.woff2') format('woff2');
    font-display: swap;
}

html,
body {
    min-height: 100svh;
    height: 100%;
}

body {
    font-family: 'Dana Medium', Tahoma, sans-serif;
}

.font-DanaMedium {
    font-family: 'Dana Medium', Tahoma, sans-serif;
}

.font-DanaDemiBold {
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
}

.font-MorabbaMedium {
    font-family: 'Morabba Medium', Tahoma, sans-serif;
}

.font-MorabbaBold {
    font-family: 'Morabba Bold', Tahoma, sans-serif;
}

.reg-page {
    min-height: 100svh;
    width: 100%;
    background-image: url('../images/Login-Background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.reg-card-wrap {
    width: 100%;
    max-width: 490px;
}

.reg-card {
    width: 100%;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

@media (min-width: 768px) {
    .reg-card {
        border-radius: 1.25rem;
        padding: 2.5rem;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    }
}

.reg-card__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #1d4ed8;
    margin-bottom: 1.25rem;
    font-family: 'Morabba Bold', Tahoma, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

.reg-card__logo {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}

.reg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    direction: rtl;
    font-family: 'Dana Medium', Tahoma, sans-serif;
}

.reg-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Dana Medium', Tahoma, sans-serif !important;
    font-size: 0.75rem;
    color: #94a3b8;
}

.reg-step span {
    font-family: 'Dana Medium', Tahoma, sans-serif !important;
}

.reg-step__dot {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-family: 'Dana DemiBold', Tahoma, sans-serif !important;
    font-size: 0.7rem;
}

.reg-step--active {
    color: #1d4ed8;
}

.reg-step--active .reg-step__dot {
    background: #2563eb;
    color: #fff;
}

.reg-step--done {
    color: #15803d;
}

.reg-step--done .reg-step__dot {
    background: #dcfce7;
    color: #15803d;
}

.reg-step__line {
    width: 1.25rem;
    height: 2px;
    background: #e2e8f0;
}

.reg-card-title {
    text-align: center;
    margin-bottom: 1rem;
}

.reg-card-title h2 {
    margin: 0;
    font-family: 'Morabba Bold', Tahoma, sans-serif;
    font-size: 1rem;
    color: #1e40af;
}

.reg-card-title p {
    margin: 0.35rem 0 0;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.8rem;
    color: #64748b;
}

.reg-input,
.reg-select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.reg-input:focus,
.reg-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.reg-input--readonly {
    background: #f8fafc;
    color: #475569;
}

.reg-input--error,
.reg-select.reg-input--error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.reg-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.reg-label {
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
    font-size: 0.8rem;
    color: #475569;
}

.reg-btn {
    width: 100%;
    height: 3rem;
    border: none;
    border-radius: 0.9rem;
    font-family: 'Morabba Medium', Tahoma, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.reg-btn--primary {
    background: #1d4ed8;
    color: #fff;
}

.reg-btn--primary:hover:not(:disabled) {
    background: #1e40af;
}

.reg-btn--secondary {
    background: #dbeafe;
    color: #1d4ed8;
}

.reg-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.reg-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.reg-alert.hidden {
    display: none !important;
}

.reg-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.reg-alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.reg-alert--closed {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    text-align: center;
    justify-content: center;
    padding: 1.25rem;
    line-height: 1.9;
}

.reg-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.78rem;
    color: #2563eb;
    line-height: 1.7;
}

.reg-consent + .reg-alert,
.reg-consent ~ .reg-alert {
    margin-top: 1.25rem;
}

.reg-consent input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.reg-otp-wrap {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    direction: ltr;
    margin: 0.5rem 0 1rem;
}

.reg-otp-input {
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    text-align: center;
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
    font-size: 1.2rem;
    color: #0f172a;
    caret-color: transparent;
}

.reg-otp-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.reg-otp-input.reg-input--error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.reg-otp-meta {
    text-align: center;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.reg-otp-resend {
    display: inline-block;
    margin-top: 0.35rem;
    color: #2563eb;
    text-decoration: none;
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
}

.reg-otp-resend:hover {
    text-decoration: underline;
}

.reg-receipt {
    border: 1px dashed #93c5fd;
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.reg-receipt__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #dbeafe;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.9rem;
    color: #334155;
}

.reg-receipt__row:last-child {
    border-bottom: none;
}

.reg-receipt__row strong {
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
    color: #1d4ed8;
}

.reg-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #16a34a;
}

.reg-success__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.reg-success__check {
    width: 1.75rem;
    height: 1.75rem;
}

.reg-success__title {
    font-family: 'Morabba Medium', Tahoma, sans-serif;
    font-size: 1.15rem;
}

.reg-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.reg-actions form {
    margin: 0;
}

.reg-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.55);
    transition: opacity 0.2s ease;
}

.reg-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.reg-modal__panel {
    width: 100%;
    max-width: 490px;
    max-height: 90svh;
    overflow: auto;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
}

.reg-modal__title {
    margin: 0 0 0.75rem;
    text-align: center;
    font-family: 'Morabba Bold', Tahoma, sans-serif;
    font-size: 1rem;
    color: #1d4ed8;
}

.reg-modal__intro {
    margin: 0 0 0.75rem;
    text-align: center;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.82rem;
    line-height: 1.8;
    color: #2563eb;
}

.reg-modal__intro strong {
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
}

.reg-modal__rules {
    max-height: 280px;
    overflow: auto;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    background: #fff;
    border-radius: 0.75rem;
    font-family: 'Dana Medium', Tahoma, sans-serif;
    font-size: 0.82rem;
    line-height: 1.9;
    color: #334155;
}

.reg-modal__rules > div + div {
    margin-top: 0.35rem;
}

.reg-modal__panel .reg-btn--primary {
    margin-bottom: 0.5rem;
}

.reg-modal__close {
    margin-top: 0;
}

body.reg-modal-open {
    overflow: hidden;
}

.reg-modal--hidden,
.reg-overlay--hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.reg-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    font-family: 'Dana DemiBold', Tahoma, sans-serif;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
}

@media print {
    .reg-btn,
    .reg-steps,
    #overlay,
    #rulesBox {
        display: none !important;
    }
}
