/* Disposal-site registration — faithful build of the Figma «تسجيل حساب جديد» screen */
:root {
    --dsreg-primary: #5c872e;
    --dsreg-font: #1c1c1c;
    --dsreg-shade-1: #292929;
    --dsreg-shade-3: #666;
    --dsreg-border: #eee;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

.dsreg-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    direction: ltr;
    background: #fff;
    font-family: 'Expo Arabic', 'Tajawal', 'Cairo', sans-serif;
}

/* —— Left media panel —— */
.dsreg-media {
    position: relative;
    display: none;
    width: 50%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
}

@media (min-width: 992px) {
    .dsreg-media {
        display: block;
    }
}

.dsreg-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #1e293b 0%, rgba(6, 95, 70, 0.5) 50%, rgba(0, 0, 0, 0) 100%);
}

.dsreg-media-content {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    padding: 48px;
    direction: rtl;
    text-align: right;
    color: #fff;
}

.dsreg-media-title {
    margin: 0 0 16px;
    font-size: 36px;
    font-weight: 800;
    line-height: 40px;
}

.dsreg-media-lead {
    margin: 0 0 24px;
    max-width: 624px;
    font-size: 18px;
    line-height: 28px;
    color: #d1fae5;
}

.dsreg-feature {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 20px;
}

.dsreg-feature:first-of-type {
    margin-top: 0;
}

.dsreg-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: var(--dsreg-primary);
}

/* —— Right form panel —— */
.dsreg-form-side {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    padding: 32px;
}

@media (min-width: 992px) {
    .dsreg-form-side {
        width: 50%;
        min-height: 100vh;
        align-items: center;
        overflow-y: auto;
    }
}

.dsreg-card {
    width: 100%;
    max-width: 512px;
    direction: rtl;
    text-align: right;
}

.dsreg-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--dsreg-primary);
}

.dsreg-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--dsreg-font);
    text-align: center;
}

.dsreg-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--dsreg-shade-3);
    text-align: center;
}

.dsreg-form {
    margin-top: 24px;
}

.dsreg-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
}

.dsreg-errors ul {
    margin: 0;
    padding-inline-start: 18px;
}

.dsreg-flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
}

.dsreg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.dsreg-row:first-of-type {
    margin-top: 0;
}

.dsreg-row--single {
    grid-template-columns: 1fr;
}

@media (max-width: 560px) {
    .dsreg-row {
        grid-template-columns: 1fr;
    }
}

.dsreg-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dsreg-shade-1);
}

.dsreg-field input,
.dsreg-field select {
    width: 100%;
    height: 46px;
    padding: 0 17px;
    border: 1px solid var(--dsreg-border);
    border-radius: 12px;
    background: #fff;
    color: var(--dsreg-font);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dsreg-field input::placeholder {
    color: var(--dsreg-shade-3);
    font-size: 12px;
}

/* Phone: start from the right (matches password / RTL), icon stays on the right */
.dsreg-phone-wrap {
    position: relative;
}

.dsreg-field .dsreg-phone-wrap input,
.dslogin-input-wrap.dsreg-phone-wrap input {
    direction: rtl;
    text-align: right;
    padding: 0 44px 0 17px;
}

.dsreg-phone-wrap .dslogin-input-icon {
    inset-inline-end: auto;
    right: 14px;
    left: auto;
}

.dsreg-phone-wrap input::placeholder {
    color: #666;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.dsreg-field input:focus,
.dsreg-field select:focus {
    border-color: var(--dsreg-primary);
    box-shadow: 0 0 0 3px rgba(92, 135, 46, 0.12);
}

.dsreg-field input.dsreg-invalid,
.dsreg-field select.dsreg-invalid,
.dsreg-file.dsreg-invalid,
.dsreg-field input.dsreg-invalid--client,
.dsreg-field select.dsreg-invalid--client,
.dsreg-file.dsreg-invalid--client {
    border-color: #ef4444;
}

.dsreg-field input.dsreg-invalid:focus,
.dsreg-field select.dsreg-invalid:focus,
.dsreg-field input.dsreg-invalid--client:focus,
.dsreg-field select.dsreg-invalid--client:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.dsreg-err {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    line-height: 1.5;
}

.dsreg-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-left: 40px;
    color: var(--dsreg-shade-3);
    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='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
}

.dsreg-field select.dsreg-has-value {
    color: var(--dsreg-font);
}

/* —— File dropzones —— */
.dsreg-file {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    height: 68px;
    padding: 14px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dsreg-file:hover {
    border-color: var(--dsreg-primary);
    background: #fafdf6;
}

.dsreg-file input[type='file'] {
    display: none;
}

.dsreg-file-text {
    flex: 1;
    text-align: right;
    overflow: hidden;
}

.dsreg-file-cta {
    display: block;
    overflow: hidden;
    color: var(--dsreg-shade-3);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dsreg-file-hint {
    display: block;
    margin-top: 2px;
    color: var(--dsreg-shade-3);
    font-size: 12px;
}

.dsreg-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f1f5f9;
}

/* —— Terms + submit + footer —— */
.dsreg-terms,
.dsreg-terms.dsauth-terms {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
    font-size: 14px;
    color: var(--dsreg-shade-3);
}

html[dir="rtl"] .dsreg-terms,
html[dir="rtl"] .dsreg-terms.dsauth-terms {
    direction: rtl;
    text-align: right;
    justify-content: flex-start;
}

html[dir="ltr"] .dsreg-terms,
html[dir="ltr"] .dsreg-terms.dsauth-terms {
    direction: ltr;
    text-align: left;
    justify-content: flex-start;
}

.dsreg-terms > span {
    flex: 0 1 auto;
    text-align: inherit;
}

.dsreg-terms a {
    color: var(--dsreg-primary);
    font-weight: 500;
    text-decoration: none;
}

.dsreg-terms input[type='checkbox'] {
    flex: none;
    order: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--dsreg-primary);
    cursor: pointer;
}

.dsreg-terms-err {
    display: block;
    text-align: start;
    margin-top: 6px;
    width: 100%;
}

html[dir="rtl"] .dsreg-terms-err {
    text-align: right;
}

.dsreg-submit {
    width: 100%;
    height: 56px;
    margin-top: 20px;
    border: none;
    border-radius: 16px;
    background: var(--dsreg-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.dsreg-submit:hover {
    filter: brightness(1.06);
}

.dsreg-footer {
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 14px;
    color: var(--dsreg-shade-3);
}

.dsreg-footer a {
    color: var(--dsreg-primary);
    font-weight: 500;
    text-decoration: none;
}

.dsreg-field--map {
    width: 100%;
}

.dsreg-map-toolbar {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dsreg-map-search {
    position: relative;
    flex: 1;
    min-width: 0;
}

.dsreg-map-search input {
    width: 100%;
}

.dsreg-map-suggestions {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 4px);
    inset-inline: 0;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--dsreg-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 220px;
    overflow: auto;
}

.dsreg-map-suggestions li {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--dsreg-font);
}

.dsreg-map-suggestions li:hover,
.dsreg-map-suggestions li:focus {
    background: #f4f7ef;
    outline: none;
}

.dsreg-map-locate {
    flex: 0 0 auto;
    border: 1px solid var(--dsreg-border);
    border-radius: 8px;
    background: #fff;
    color: var(--dsreg-shade-1);
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.dsreg-map-locate:hover {
    border-color: var(--dsreg-primary);
    color: var(--dsreg-primary);
}

.dsreg-map-locate:disabled {
    opacity: 0.6;
    cursor: wait;
}

.dsreg-map {
    width: 100%;
    height: 260px;
    margin-top: 10px;
    border: 1px solid var(--dsreg-border);
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f3;
    z-index: 1;
}

.dsreg-map .leaflet-container {
    width: 100%;
    height: 100%;
    font: inherit;
}

.dsreg-map-hint {
    display: block;
    margin-top: 6px;
    color: var(--dsreg-shade-3);
    font-size: 12px;
}

@media (max-width: 640px) {
    .dsreg-map-toolbar {
        flex-direction: column;
    }

    .dsreg-map {
        height: 220px;
    }
}
