/* ===== Domain search & reservation (Pages/Domains.cshtml + the search band on the home page) =====
   Uses the same colour tokens as site.css, so dark mode and RTL (Arabic) work automatically. */

.dm-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- hero + search box ---------- */
.dm-hero {
    position: relative;
    padding: 92px 0 70px;
    background:
        radial-gradient(900px 380px at 85% -10%, rgba(83,109,254,.14), transparent 70%),
        radial-gradient(700px 320px at 0% 110%, rgba(139,92,246,.10), transparent 70%),
        var(--bg-hero);
    border-bottom: 1px solid var(--line);
}

    .dm-hero h1 {
        max-width: 760px;
        margin: 24px 0 18px;
        font-size: clamp(36px, 4.8vw, 58px);
        line-height: 1.12;
        letter-spacing: -2.6px;
        font-weight: 800;
        color: var(--ink);
    }

body.rtl .dm-hero h1 {
    letter-spacing: -1px;
}

.dm-hero h1 span {
    color: var(--blue);
}

.dm-lead {
    max-width: 600px;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}

.dm-search {
    display: flex;
    gap: 10px;
    max-width: 680px;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(24,35,71,.08);
}

html[data-theme="dark"] .dm-search {
    box-shadow: 0 18px 55px rgba(0,0,0,.45);
}

.dm-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(83,109,254,.16), 0 18px 55px rgba(24,35,71,.08);
}

.dm-search input {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: none;
}

    .dm-search input::placeholder {
        color: var(--muted);
        opacity: .75;
        font-size: 14px;
    }

.dm-search .button {
    min-height: 50px;
    padding-inline: 30px;
    font-size: 14px;
}

    .dm-search .button:disabled {
        opacity: .6;
        cursor: progress;
        transform: none;
    }

.dm-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

    .dm-trust li::before {
        content: "✓";
        margin-inline-end: 7px;
        color: var(--green);
        font-weight: 800;
    }

.dm-message {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

    .dm-message.is-error {
        color: #e5484d;
    }

/* ---------- results ---------- */
.dm-results-section {
    padding: 64px 0 20px;
}

.dm-results-head {
    margin-bottom: 26px;
}

    .dm-results-head h2 {
        margin: 0 0 8px;
        font-size: clamp(24px, 3vw, 32px);
        letter-spacing: -1.2px;
        color: var(--ink);
    }

    .dm-results-head p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
    }

.dm-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.6fr);
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
}

    .dm-row:hover {
        border-color: var(--blue);
        box-shadow: 0 12px 34px rgba(30,44,88,.07);
    }

html[data-theme="dark"] .dm-row:hover {
    box-shadow: 0 12px 34px rgba(0,0,0,.4);
}

.dm-row-available {
    border-color: rgba(47,157,122,.45);
}

.dm-row-taken, .dm-row-unknown, .dm-row-reserved {
    opacity: .78;
}

.dm-name {
    overflow-wrap: anywhere;
    font-size: 18px;
    color: var(--muted);
    unicode-bidi: isolate;
    text-align: start;
}

    .dm-name b {
        color: var(--ink);
        font-weight: 700;
    }

.dm-badge {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    background: var(--soft);
    color: var(--muted);
}

.dm-badge-available {
    background: var(--icon-green-bg);
    color: var(--icon-green-fg);
}

.dm-badge-premium, .dm-badge-unsupported {
    background: var(--icon-purple-bg);
    color: var(--icon-purple-fg);
}

.dm-badge-reserved {
    background: var(--icon-orange-bg);
    color: var(--icon-orange-fg);
}

.dm-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 0;
}

.dm-price {
    display: grid;
    text-align: end;
    line-height: 1.35;
}

    .dm-price b {
        font-size: 19px;
        color: var(--ink);
        letter-spacing: -.4px;
    }

    .dm-egp {
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.dm-fx {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

    .dm-fx a {
        color: var(--blue);
        text-decoration: underline;
        text-underline-offset: 3px;
    }

.dm-done-amount {
    color: var(--ink);
}

.dm-price small, .dm-note {
        color: var(--muted);
        font-size: 11px;
    }

.dm-note {
    text-align: end;
    font-size: 12px;
}

.dm-empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

/* ---------- how it works ---------- */
.dm-how {
    padding-top: 84px;
}

.dm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dm-step {
    padding: 26px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

.dm-step-n {
    display: block;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.dm-step h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--ink);
}

.dm-step p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

/* ---------- track ---------- */
.dm-track-section {
    background: var(--bg-soft);
    border-block: 1px solid var(--line);
}

.dm-track-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

    .dm-track-grid h2 {
        margin: 14px 0 12px;
        font-size: clamp(28px, 3.2vw, 38px);
        letter-spacing: -1.6px;
        color: var(--ink);
    }

        .dm-track-grid h2 span {
            color: var(--blue);
        }

    .dm-track-grid p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.9;
    }

.dm-track-card {
    padding: 26px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
}

.dm-track-row {
    display: flex;
    gap: 10px;
}

    .dm-track-row input {
        flex: 1;
        min-width: 0;
        padding: 12px 14px;
        font: inherit;
        font-size: 15px;
        letter-spacing: 1px;
        color: var(--ink);
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: 10px;
    }

        .dm-track-row input:focus {
            outline: none;
            border-color: var(--blue);
            box-shadow: 0 0 0 3px rgba(83,109,254,.18);
        }

.dm-track-result {
    margin: 16px 0 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.8;
}

    .dm-track-result.is-error {
        color: #e5484d;
    }

/* ---------- faq ---------- */
.dm-faq-inner {
    max-width: 760px;
}

.dm-faq details {
    border-bottom: 1px solid var(--line);
}

.dm-faq summary {
    padding: 18px 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

    .dm-faq summary::-webkit-details-marker {
        display: none;
    }

    .dm-faq summary::after {
        content: "+";
        color: var(--blue);
        font-size: 20px;
        line-height: 1;
    }

.dm-faq details[open] summary::after {
    content: "–";
}

.dm-faq details p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.9;
}

/* ---------- reservation dialog ---------- */
.dm-dialog {
    width: min(640px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    color: var(--ink);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(10,16,38,.35);
}

    .dm-dialog::backdrop {
        background: rgba(8,12,28,.6);
        backdrop-filter: blur(3px);
    }

.dm-dialog-inner {
    position: relative;
    padding: 32px 30px 28px;
}

.dm-close {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--soft);
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

    .dm-close:hover {
        color: var(--ink);
    }

.dm-dialog h2 {
    margin: 0 36px 8px 0;
    font-size: 22px;
    letter-spacing: -.6px;
    color: var(--ink);
}

body.rtl .dm-dialog h2 {
    margin: 0 0 8px 36px;
}

.dm-domain-name {
    color: var(--blue);
    overflow-wrap: anywhere;
}

.dm-dialog-note {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.85;
}

.dm-summary {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.dm-total {
    display: grid;
    gap: 2px;
    text-align: end;
}

    .dm-total small {
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .dm-total b {
        font-size: 24px;
        letter-spacing: -.8px;
        color: var(--ink);
    }

    .dm-total span {
        color: var(--muted);
        font-size: 11px;
    }

.dm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 14px;
}

.dm-wide {
    grid-column: 1 / -1;
}

.dm-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

    .dm-field > span, .dm-field > label span {
        color: var(--ink);
        font-size: 11px;
        font-weight: 700;
    }

    .dm-field input, .dm-field select, .dm-field textarea {
        width: 100%;
        min-width: 0;
        padding: 11px 13px;
        font: inherit;
        font-size: 14px;
        color: var(--ink);
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: 10px;
        transition: border-color .2s, box-shadow .2s;
    }

    .dm-field textarea {
        resize: vertical;
    }

        .dm-field input:focus, .dm-field select:focus, .dm-field textarea:focus {
            outline: none;
            border-color: var(--blue);
            box-shadow: 0 0 0 3px rgba(83,109,254,.18);
        }

    .dm-field.is-invalid input, .dm-field.is-invalid select {
        border-color: #e5484d;
        box-shadow: 0 0 0 3px rgba(229,72,77,.15);
    }

.dm-err {
    color: #e5484d;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
}

.dm-phone {
    direction: ltr; /* country code on the left, number on the right, also in Arabic */
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 8px;
}

.dm-hp {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.dm-form-error {
    margin: 16px 0 0;
    padding: 11px 14px;
    color: #c8383d;
    background: rgba(229,72,77,.09);
    border: 1px solid rgba(229,72,77,.3);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
}

.dm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

    .dm-actions .button {
        flex: 1 1 180px;
    }

    .dm-actions .button:disabled {
        opacity: .65;
        cursor: progress;
        transform: none;
    }

.dm-fineprint {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.8;
}

/* success step */
#dm-step-done {
    text-align: center;
}

    #dm-step-done h2 {
        margin-inline: 0;
    }

    #dm-step-done p {
        margin: 0 0 12px;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.9;
    }

.dm-done-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--icon-green-bg);
    color: var(--icon-green-fg);
    font-size: 28px;
    font-weight: 800;
}

.dm-done-lead b {
    color: var(--ink);
    font-size: 20px;
    overflow-wrap: anywhere;
}

.dm-code-box {
    margin: 18px 0 6px;
    padding: 16px;
    background: var(--bg-soft);
    border: 1px dashed var(--blue);
    border-radius: 12px;
}

    .dm-code-box small {
        display: block;
        margin-bottom: 8px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .dm-code-box div {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .dm-code-box code {
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 2px;
        color: var(--ink);
    }

/* ---------- search band on the home page ---------- */
.dm-band {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 40px;
    align-items: center;
    padding: 42px 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(24,35,71,.055);
}

html[data-theme="dark"] .dm-band {
    box-shadow: 0 18px 55px rgba(0,0,0,.4);
}

.dm-band h2 {
    margin: 14px 0 10px;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -1.5px;
    line-height: 1.2;
    color: var(--ink);
}

    .dm-band h2 span {
        color: var(--blue);
    }

.dm-band p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.dm-band .dm-search {
    max-width: none;
    background: var(--bg);
    box-shadow: none;
}

.dm-band-hint {
    margin-top: 12px;
    font-size: 11.5px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .dm-track-grid, .dm-band {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .dm-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dm-hero {
        padding: 60px 0 48px;
    }

    .dm-hero h1 {
        letter-spacing: -1.6px;
    }

    .dm-search {
        flex-direction: column;
        padding: 10px;
    }

        .dm-search input {
            min-height: 48px;
        }

    .dm-row {
        grid-template-columns: 1fr auto;
        gap: 10px 12px;
        padding: 14px 16px;
    }

    .dm-side {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .dm-note, .dm-price {
        text-align: start;
    }

    .dm-name {
        font-size: 17px;
    }

    .dm-band {
        padding: 28px 20px;
    }

    .dm-dialog-inner {
        padding: 26px 18px 22px;
    }

    .dm-grid, .dm-summary {
        grid-template-columns: 1fr;
    }

    .dm-total {
        text-align: start;
    }

    .dm-track-row {
        flex-direction: column;
    }
}
