/* PHOTON Solar - FusionSolar Style Registration Stylesheet */
:root {
    --primary-blue: #0077ff;
    --primary-hover: #005fcc;
    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    --border-color: #d9d9d9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --danger: #ff4d4f;
    --font-ar: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
    --font-en: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-dark);
    font-family: var(--font-ar);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="ltr"] body {
    font-family: var(--font-en);
}

/* ─── Top Header ───────────────────────────────────────────────────────────── */
.reg-header {
    background: #001529;
    color: #ffffff;
    height: 56px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reg-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.reg-header-logo {
    height: 32px;
}

.reg-header-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.reg-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.reg-header-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    cursor: pointer;
}

.reg-header-link:hover {
    color: #ffffff;
}

/* Language Dropdown (Unified) */
.lang-dropdown-wrap {
    position: relative;
}

.top-select-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.top-select-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    min-width: 130px;
    padding: 5px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 150;
    animation: zoomIn 0.2s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.lang-dropdown-menu.open {
    display: flex;
}

.lang-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    width: 100%;
}

.lang-menu-item:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
}

.lang-menu-item.active {
    background: rgba(0, 119, 255, 0.1);
    color: var(--primary-blue);
}

/* ─── Main Content Container ───────────────────────────────────────────────── */
.reg-container {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 40px 16px;
}

/* ─── Blue Info Alert Banner ───────────────────────────────────────────────── */
.reg-info-alert {
    background: #e6f4ff;
    border: 1px solid #91caff;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0958d9;
    font-size: 13px;
    line-height: 1.5;
}

.reg-info-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ─── White Card Form ──────────────────────────────────────────────────────── */
.reg-card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 40px 48px;
}

.reg-form-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 36px;
}

.reg-form-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 620px;
    margin: 0 auto;
}

.reg-row {
    display: flex;
    align-items: center;
}

.reg-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    text-align: end;
    padding-inline-end: 16px;
}

.reg-required {
    color: var(--danger);
    margin-inline-end: 4px;
    font-weight: bold;
}

.reg-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.reg-input, .reg-select {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 12px;
    font-size: 13px;
    color: #1e293b;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: #ffffff;
}

.reg-input:focus, .reg-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(0, 119, 255, 0.15);
}

.pwd-toggle-btn {
    position: absolute;
    inset-inline-end: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
}

.pwd-toggle-btn:hover {
    color: var(--primary-blue);
    background: rgba(0, 119, 255, 0.08);
}

/* Verification Code Inline Button */
.code-input-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-get-code {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #ffffff;
    border: 1px solid #1890ff;
    border-radius: 6px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    height: 38px;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.btn-get-code:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #096dd9 100%);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
    transform: translateY(-1px);
}

.btn-get-code:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
}

.btn-get-code:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Agreement Checkbox Row */
.reg-terms-row {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.reg-terms-row input {
    accent-color: var(--primary-blue);
    width: 15px;
    height: 15px;
}

.reg-terms-row a {
    color: var(--primary-blue);
    text-decoration: none;
}

.reg-terms-row a:hover {
    text-decoration: underline;
}

/* Submit Button Row */
.reg-submit-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn-reg-main-submit {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #ffffff;
    border: 1px solid #1890ff;
    border-radius: 8px;
    height: 42px;
    min-width: 220px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(24, 144, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-reg-main-submit:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #096dd9 100%);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.45);
    transform: translateY(-1px);
}

.btn-reg-main-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.25);
}

.btn-reg-main-submit:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 768px) {
    .reg-card {
        padding: 24px 16px;
    }
    .reg-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .reg-label {
        width: 100%;
        text-align: start;
        padding-inline-end: 0;
    }
    .reg-input-wrap {
        width: 100%;
    }
}

/* ─── On-Screen OTP Display Modal ─────────────────────────────────────────── */
.otp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 21, 41, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}

.otp-modal-overlay.open {
    display: flex;
}

.otp-modal-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: scaleUp 0.25s ease-out;
    border: 1px solid rgba(0, 119, 255, 0.2);
}

.otp-modal-header {
    background: #e6f4ff;
    border-bottom: 1px solid #bae0ff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.otp-modal-icon {
    font-size: 22px;
}

.otp-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #0050b3;
}

.otp-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.otp-modal-desc {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.5;
}

.otp-code-display-box {
    background: #f6ffed;
    border: 2px dashed #52c41a;
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.otp-code-display-box:hover {
    background: #e6f7d9;
    border-color: #389e0d;
}

.otp-code-digits {
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #237804;
}

.btn-copy-otp {
    background: #52c41a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-family: inherit;
}

.btn-copy-otp:hover {
    background: #389e0d;
}

.otp-modal-hint {
    font-size: 12px;
    color: #52c41a;
    font-weight: 600;
}

.otp-modal-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.btn-otp-modal-close {
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-otp-modal-close:hover {
    background: var(--primary-hover);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
