/**
 * Email Setup screen — pre-cart configuration.
 *
 * Standalone front-end page (not the account portal), so this is self-contained.
 * Visual language mirrors the Workspace Setup wizard: centered white rounded card,
 * dark primary button.
 */

/* Hide the WordPress/Elementor page title on the setup page — the card carries its
   own heading. */
body:has(.swi-setup-wrapper) .page-header,
body:has(.swi-setup-wrapper) .entry-header,
body:has(.swi-setup-wrapper) header.entry-header,
body:has(.swi-setup-wrapper) h1.entry-title,
body:has(.swi-setup-wrapper) .entry-title,
body:has(.swi-setup-wrapper) .page-title,
body:has(.swi-setup-wrapper) .elementor-page-title {
    display: none;
}

.swi-setup-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 8rem) 20px;
    font-family: inherit;
}

.swi-setup-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.swi-setup-card--message {
    text-align: center;
}

.swi-setup-heading {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
    margin: 0 0 10px 0;
}

.swi-setup-intro {
    color: #636363;
    margin: 0 0 30px 0;
}

/* ── Error summary ── */
.swi-setup-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 0 0 24px 0;
}

.swi-setup-error ul {
    margin: 0;
    padding-left: 18px;
}

/* ── Fields ── */
.swi-setup-field {
    margin-bottom: 22px;
}

.swi-setup-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1b1c1c;
    margin-bottom: 8px;
}

.swi-required {
    color: #c62828;
}

.swi-setup-field input[type="text"],
.swi-setup-field input[type="tel"],
.swi-setup-field .swi-domain-select {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid #a0a0a0;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.swi-setup-field input:focus,
.swi-setup-field .swi-domain-select:focus {
    border-color: #1b1c1c;
}

.swi-setup-hint {
    display: block;
    color: #999;
    font-size: 13px;
    margin-top: 6px;
}

/* ── Realtime availability feedback ── */
.swi-availability-feedback {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.swi-checking {
    color: #999;
}

.swi-available {
    color: #047857;
    font-weight: 600;
}

.swi-taken,
.swi-error {
    color: #c62828;
    font-weight: 600;
}

.swi-suggestions {
    margin-top: 6px;
    font-size: 13px;
    color: #636363;
}

.swi-suggestion {
    color: #1b1c1c;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.swi-suggestion:hover {
    color: #000;
}

/* ── Email input + domain (suffix or select) ── */
.swi-email-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.swi-email-wrapper input[type="text"] {
    border-radius: 10px 0 0 10px !important;
    border-right: 0 !important;
    flex: 1;
    min-width: 0;
}

.swi-domain-suffix {
    display: flex;
    align-items: center;
    background: #f4f4f6;
    border: 1px solid #a0a0a0;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    padding: 0 14px;
    color: #495057;
    white-space: nowrap;
}

/* Specific enough to beat a theme's "My Account selects are full width" rule, which
   would squeeze the username field to nothing on the Email page. */
.swi-setup-form .swi-email-wrapper select.swi-domain-select {
    width: auto;
    flex: 0 0 auto;
    border-radius: 0 10px 10px 0 !important;
    border-left: 0 !important;
    background: #f4f4f6;
}

/* ── Actions / button ── */
.swi-setup-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

/* !important throughout to beat the parent theme's reset / Elementor button styles
   on this standalone page (mirrors the Workspace Setup wizard). */
.swi-setup-button,
a.swi-setup-button,
button.swi-setup-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #1b1c1c !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 24px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: background 0.2s ease !important;
}

.swi-setup-button:hover,
.swi-setup-button:focus,
.swi-setup-button:active,
a.swi-setup-button:hover,
button.swi-setup-button:hover,
button.swi-setup-button:focus {
    background: #323333 !important;
    color: #fff !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .swi-setup-card {
        padding: 24px 20px;
    }

    .swi-setup-heading {
        font-size: 26px;
    }

    .swi-setup-actions {
        justify-content: stretch;
    }

    .swi-setup-button {
        width: 100%;
    }
}

/* ── Telefoonveld: landkeuze naast het nummer ── */
.swi-phone-wrapper {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.swi-setup-field .swi-phone-country {
    width: auto;
    flex: 0 0 auto;
    min-width: 110px;
    height: 52px;
    padding: 0 12px;
    border: 1px solid #a0a0a0;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.swi-setup-field .swi-phone-country:focus {
    border-color: #1b1c1c;
}

.swi-phone-wrapper input[type="tel"] {
    flex: 1;
    min-width: 0;
}

.swi-optional {
    color: #999;
    font-weight: 400;
}

@media (max-width: 480px) {
    .swi-phone-wrapper {
        flex-direction: column;
    }
    .swi-setup-field .swi-phone-country {
        max-width: 100%;
        width: 100%;
    }
}
