/* Car Wash — login / register page styling.
 * The purple card carries white text; form inputs stay white with dark text
 * so users can actually read what they type.
 */

.carwash-auth-main {
    background: linear-gradient(135deg, #8a2be2 0%, #6a1b9a 100%);
    min-height: calc(100vh - 200px);
    padding: 3rem 1rem;
    color: #ffffff;
}

.carwash-auth-container {
    max-width: 480px;
    margin: 0 auto;
}

.carwash-auth-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    padding: 2.25rem 2rem;
    box-shadow: 0 12px 36px rgba(74, 13, 109, 0.35);
    color: #ffffff;
}

.carwash-auth-card h1,
.carwash-auth-card h2,
.carwash-auth-title {
    color: #ffffff;
    text-align: center;
    margin: 0 0 0.5rem;
    font-size: 1.55rem;
}

.carwash-auth-sub {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.5rem;
}

/* Form labels stay white over the purple card */
.carwash-auth-card label,
.carwash-auth-card .woocommerce-form-row label {
    color: #ffffff;
    font-weight: 500;
    display: block;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carwash-auth-card .required {
    color: #ffd700;
}

/* Force all form rows to be full-width stacked — WC's login template uses
 * .form-row-first / .form-row-last (50/50 columns) while our register uses
 * .form-row-wide. Override so both pages share the same layout. */
.carwash-auth-card .form-row,
.carwash-auth-card .form-row-first,
.carwash-auth-card .form-row-last,
.carwash-auth-card .form-row-wide,
.carwash-auth-card .woocommerce-form-row,
.carwash-auth-card .woocommerce-form-row--first,
.carwash-auth-card .woocommerce-form-row--last,
.carwash-auth-card .woocommerce-form-row--wide {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-bottom: 1rem !important;
}

/* Base input styles */
.carwash-auth-card input[type="text"],
.carwash-auth-card input[type="email"],
.carwash-auth-card input[type="password"],
.carwash-auth-card input[type="number"],
.carwash-auth-card .input-text,
.carwash-auth-card .woocommerce-Input {
    background: #ffffff;
    color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Email input */
.carwash-auth-card input[name="email"],
.carwash-auth-card input#reg_email {
    width: 280px !important;
    margin: 0 0 0 auto;
    display: block;
}

/* Password input */
.carwash-auth-card input[name="password"],
.carwash-auth-card input#reg_password {
    width: 280px !important;
    margin: 0 0 0 auto;
    display: block;
}

/* Username input */
.carwash-auth-card input[name="username"],
.carwash-auth-card input#reg_username {
    width: 280px !important;
    margin: 0 0 0 auto;
    display: block;
}

.carwash-auth-card input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.carwash-auth-card .form-row {
    margin-bottom: 1rem;
}

/* Submit button: white pill with purple text — inverse of card */
.carwash-auth-card button[type="submit"],
.carwash-auth-card .woocommerce-button,
.carwash-auth-card .woocommerce-Button {
    width: 100%;
    background: #ffffff;
    color: #6a1b9a;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.carwash-auth-card button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.carwash-auth-card .lost_password,
.carwash-auth-card .lost_password a {
    color: rgba(255, 255, 255, 0.92);
}
.carwash-auth-card .lost_password a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* "Remember me" checkbox row */
.carwash-auth-card .woocommerce-form-login__rememberme,
.carwash-auth-card .woocommerce-form__label-for-checkbox {
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.carwash-auth-card .woocommerce-Input--checkbox {
    width: auto;
    margin-right: 0.4rem;
}

/* "Don't have an account? Register here" footer */
.carwash-auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
}

.carwash-auth-switch a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.carwash-auth-switch a:hover {
    color: #ffd700;
}

/* Captcha styling - force flex layout with highest specificity */
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register p.captcha-row,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register p.woocommerce-form-row.captcha-row,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register p.form-row.captcha-row,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register div.captcha-row,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register div.woocommerce-form-row.captcha-row,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register div.form-row.captcha-row {
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    flex-wrap: nowrap !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    clear: none !important;
    position: relative !important;
}

html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register p.captcha-row label,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register div.captcha-row label {
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    width: auto !important;
    float: none !important;
    position: static !important;
}

html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register p.captcha-row .captcha-group,
html body .carwash-auth-main .carwash-auth-container .carwash-auth-card form.register div.captcha-row .captcha-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    flex-shrink: 0 !important;
    float: none !important;
    margin-left: auto !important;
}

/* Also reset any float styles on captcha elements */
.carwash-auth-card .captcha-row label,
.carwash-auth-card .captcha-row .captcha-group,
.carwash-auth-card .captcha-row .captcha-image-box,
.carwash-auth-card .captcha-row .captcha-input {
    float: none !important;
    display: inline-flex !important;
    vertical-align: middle !important;
}

.carwash-auth-card .captcha-image-box {
    position: relative;
    flex-shrink: 0;
    margin-right: 40px;
}

.carwash-auth-card .captcha-img {
    width: 100px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carwash-auth-card .captcha-refresh-btn {
    position: absolute;
    top: 50%;
    right: -32px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.carwash-auth-card .captcha-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.1);
}

.carwash-auth-card .captcha-refresh-btn svg {
    width: 14px;
    height: 14px;
}

.carwash-auth-card .captcha-input {
    width: 120px !important;
    min-width: 100px;
    max-width: 150px;
    background: #ffffff;
    color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.carwash-auth-card .captcha-input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.carwash-auth-card .captcha-input::placeholder {
    color: #6c757d;
}

/* Hide WooCommerce Chinese privacy text */
.carwash-auth-card .woocommerce-privacy-policy-text {
    display: none !important;
}

/* Custom privacy policy text */
.carwash-auth-card .carwash-privacy-text {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #ffffff;
}

.carwash-auth-card .carwash-privacy-text a {
    color: #ffd700;
    text-decoration: underline;
}

.carwash-auth-card .carwash-privacy-text a:hover {
    color: #ffffff;
}

.carwash-auth-card .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* WooCommerce notices look ok on light bg but read badly on purple — wrap them */
.carwash-auth-card .woocommerce-error,
.carwash-auth-card .woocommerce-message,
.carwash-auth-card .woocommerce-info {
    background: #ffffff;
    color: #212529;
    border-left-color: #8a2be2;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 540px) {
    .carwash-auth-card {
        padding: 1.5rem 1.25rem;
    }
    .carwash-auth-card h1 {
        font-size: 1.3rem;
    }
}

/* ─── Thank-you / order-received page ─────────────────────────── */
.carwash-thankyou-card h1,
.carwash-thankyou-card h2,
.carwash-thankyou-card h3,
.carwash-thankyou-card p,
.carwash-thankyou-card li,
.carwash-thankyou-card td,
.carwash-thankyou-card strong {
    color: #ffffff !important;
}

.carwash-thankyou-card a {
    color: #ffd700;
    text-decoration: underline;
}

.carwash-thankyou-card a:hover {
    color: #ffffff;
}

.carwash-thankyou-card .woocommerce-order-overview {
    list-style: none;
    padding: 1rem 0;
    margin: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.carwash-thankyou-card .woocommerce-order-overview li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

.carwash-thankyou-card .woocommerce-order-overview strong {
    display: block;
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

/* Order detail tables (products, totals) on a purple card */
.carwash-thankyou-card .woocommerce-table,
.carwash-thankyou-card table.shop_table {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    margin-top: 1.5rem;
}

.carwash-thankyou-card .woocommerce-table th,
.carwash-thankyou-card .woocommerce-table td,
.carwash-thankyou-card table.shop_table th,
.carwash-thankyou-card table.shop_table td {
    border-color: rgba(255,255,255,0.18);
    padding: 0.75rem 1rem;
}
