/* join.css — /join/ registration page */

/* Override Astra box layout + container on join page */
body.mch-join #page {
    max-width: 100% !important;
}
body.mch-join .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.mch-join #primary {
    width: 100%;
    max-width: 100%;
    float: none;
    margin: 0;
}
body.mch-join #secondary {
    display: none;
}
body.mch-join .entry-header,
body.mch-join .page-header {
    display: none;
}

.mch-join-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80vh;
    padding: 40px 20px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.mch-join-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    padding: 40px 36px;
}

/* ── Header ── */
.mch-join-header {
    text-align: center;
    margin-bottom: 28px;
}

.mch-join-logo {
    margin-bottom: 16px;
}

.mch-join-logo img {
    max-height: 40px;
    width: auto;
}

.mch-join-logo strong {
    font-size: 1.1rem;
    color: var(--ast-global-color-2, #1e293b);
}

.mch-join-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ast-global-color-2, #1e293b);
    margin: 0 0 6px;
}

.mch-join-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* ── Error ── */
.mch-join-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.mch-join-error i {
    margin-right: 6px;
}

/* ── Listing badge ── */
.mch-join-listing-badge {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--ast-global-color-0, #3b82f6);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.mch-join-listing-badge i {
    margin-right: 6px;
}

/* ── Form ── */
.mch-join-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mch-join-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mch-join-field input,
.mch-join-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.mch-join-field input:focus,
.mch-join-field select:focus {
    outline: none;
    border-color: var(--ast-global-color-0, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.mch-join-field input::placeholder {
    color: #94a3b8;
}

.mch-join-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}
.mch-join-hint i {
    color: #ea4335;
    margin-right: 3px;
}

/* ── Listing autocomplete ── */
.mch-join-listing-wrap {
    position: relative;
}

.mch-join-listing-wrap input {
    padding-right: 36px;
}

.mch-join-listing-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--ast-global-color-0, #3b82f6);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.mch-join-listing-results.is-open {
    display: block;
}

.mch-join-listing-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.mch-join-listing-item:last-child {
    border-bottom: none;
}

.mch-join-listing-item:hover,
.mch-join-listing-item.is-active {
    background: #eff6ff;
    color: var(--ast-global-color-0, #3b82f6);
}

.mch-join-listing-item--new {
    color: var(--ast-global-color-0, #3b82f6);
    font-weight: 600;
    border-top: 2px solid #e5e7eb;
}

.mch-join-listing-item--new i {
    margin-right: 6px;
}

/* Selected listing pill */
.mch-join-listing-selected {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0f9ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e40af;
    font-weight: 500;
}

.mch-join-listing-selected.is-visible {
    display: flex;
}

.mch-join-listing-selected i {
    color: var(--ast-global-color-0, #3b82f6);
}

.mch-join-listing-clear {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}

.mch-join-listing-clear:hover {
    color: #ef4444;
}

/* New listing notice */
.mch-join-listing-new-notice {
    display: none;
    padding: 10px 14px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #92400e;
    margin-top: 8px;
    line-height: 1.4;
}

.mch-join-listing-new-notice.is-visible {
    display: block;
}

.mch-join-listing-new-notice i {
    margin-right: 4px;
}

/* ── Button ── */
.mch-join-btn {
    width: 100%;
    padding: 14px;
    background: var(--ast-global-color-0, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    margin-top: 4px;
}

.mch-join-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.mch-join-btn i {
    margin-right: 8px;
}

/* ── Footer ── */
.mch-join-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mch-join-footer a {
    font-size: 0.88rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.mch-join-footer a:hover {
    color: var(--ast-global-color-0, #3b82f6);
}

.mch-join-footer a i {
    margin-right: 4px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .mch-join-wrapper {
        padding: 20px 12px;
        min-height: auto;
    }

    .mch-join-card {
        padding: 28px 20px;
        box-shadow: none;
        border: none;
    }

    .mch-join-header h1 {
        font-size: 1.3rem;
    }
}
