/* ---------- ChairHaven: custom compact login/register ---------- */
/* Global page background */
body.woocommerce-account {
    background: #f2f2f2 !important;
    font-family: "Poppins", Arial, sans-serif;
    color: #454545;
}

/* Center wrapper */
.ch-account-page {
    display: flex;
    justify-content: center;
    padding: 70px 20px;
}

.ch-account-wrap {
    width: 100%;
    max-width: 680px;
    background: #ffffff;
    padding: 48px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(20,20,20,0.06);
    text-align: center;
}

/* Title & subtitle */
.ch-title {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #141414; /* primary */
    font-size: 26px;
    letter-spacing: 2px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.ch-sub {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    color: #666;
    margin-bottom: 28px;
    font-size: 14px;
}

/* Form layout */
.ch-form {
    max-width: 520px;
    margin: 0 auto 18px;
    text-align: left;
}

/* Input rows */
.ch-form-row {
    margin-bottom: 16px;
}

.ch-form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #454545;
    font-weight: 500;
}

/* Inputs */
.ch-form .input-text {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.ch-form .input-text:focus {
    outline: none;
    border-color: #0B7E8A; /* secondary accent on focus */
    box-shadow: 0 6px 18px rgba(11,126,138,0.08);
}

/* Actions row (button) */
.ch-form-row--actions {
    margin-top: 10px;
    margin-bottom: 8px;
}

.ch-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

/* Primary CTA: dark (primary color) */
.ch-btn-primary {
    background: #141414; /* Primary */
    color: #fff;
    width: 100%;
    box-shadow: none;
}

/* Links & small text */
.ch-help,
.ch-alt {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    color: #666;
}

.ch-alt .ch-link,
.ch-link {
    color: #0B7E8A; /* Accent/secondary */
    font-weight: 600;
    text-decoration: none;
}

.ch-lost {
    float: right;
    font-size: 13px;
    color: #0B7E8A;
    text-decoration: none;
}

.ch-remember {
    font-size: 14px;
    color: #666;
}

/* Small note (register) */
.ch-note {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .ch-account-wrap {
        padding: 32px;
        margin: 0 12px;
        border-radius: 12px;
    }
    .ch-title {
        font-size: 22px;
    }
    .ch-form { max-width: 100%; }
}

@media (max-width: 420px) {
    .ch-account-wrap { padding: 22px; }
    .ch-btn { padding: 12px 20px; border-radius: 26px; }
    .ch-sub { font-size: 13px; }
}

/* ====== REVISION: CHAIRHAVEN LOGIN STYLE ====== */

/* Title → use El Messiri Bold */
.ch-title {
    font-family: "El Messiri", sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 26px;
    margin-bottom: 10px;
}

/* Remove dotted border & dotted container effect */
.woocommerce-form,
.ch-form {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Remove any dotted outline WooCommerce adds */
fieldset,
.ch-form fieldset,
.woocommerce form .form-row {
    border: none !important;
}

/* Wrapper adjust — reduce padding so form lebih padat */
.ch-account-wrap {
    padding: 36px 40px !important;
    border-radius: 18px;
}

/* Inputs — keep clean & rounded */
.ch-form .input-text {
    border: 1px solid #dcdcdc !important;
    background: #fff !important;
    height: 48px;
    font-size: 14px;
    border-radius: 12px !important;
}

/* Button → Full width, rounded, Cottonink style */
.ch-btn-primary {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 40px !important;
    height: 50px !important;
    font-size: 15px;
    letter-spacing: 1px;
    font-weight: 600;
    background: #141414 !important;
}

/* Center button horizontally if ever wrapped */
.ch-form-row--actions {
    text-align: center !important;
}

/* Spacing between elements tighten */
.ch-help,
.ch-alt {
    margin-top: 18px !important;
}

/* Mobile enhancement → button & card proportions like Cottonink */
@media (max-width: 480px) {

    .ch-account-wrap {
        padding: 28px 24px !important;
        margin: 0 10px;
    }

    .ch-title {
        font-size: 22px !important;
        letter-spacing: 2px;
    }

    .ch-form .input-text {
        height: 46px !important;
        border-radius: 12px !important;
    }

    .ch-btn-primary {
        width: 100% !important;
        height: 48px !important;
        font-size: 14px !important;
        border-radius: 40px !important;
    }
}

/* ====== ChairHaven: Button color, alignment & mobile fixes ====== */

/* 1) Accent button color + perfectly centered label */
.ch-btn-primary {
    background: #0B7E8A !important; /* Accent */
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 24px !important;
    height: 50px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    letter-spacing: 1px !important;
    box-shadow: none !important;
    border: none !important;
    text-align: center !important;
}

/* ensure button text doesn't inherit odd line-height */
.ch-btn-primary, .ch-btn-primary * {
    line-height: 1 !important;
}

/* 2) Align "Remember me" + "Lost your password" to the left */
/* Make help area a left-aligned column and keep checkbox inline with label */
.ch-help {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
    margin-top: 12px !important;
}

.ch-remember {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: #454545 !important;
}

/* lost password link placed under/with same left alignment */
.ch-lost {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    color: #0B7E8A !important;
    text-decoration: none !important;
}

/* If theme tries to float the lost link, cancel it */
.ch-lost[style] {
    float: none !important;
}

/* 3) Make sure input fields are full width inside form */
.ch-form .input-text {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 4) Mobile: force button & inputs to be full width and sized nicely */
@media (max-width: 480px) {

    .ch-account-wrap {
        padding: 22px 18px !important;
        margin: 0 8px !important;
    }

    .ch-form .input-text {
        height: 46px !important;
        border-radius: 12px !important;
    }

    .ch-btn-primary {
        width: 100% !important;
        height: 48px !important;
        border-radius: 34px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
        font-size: 14px !important;
    }

    /* ensure alt links are still left aligned on mobile */
    .ch-help, .ch-alt {
        align-items: flex-start !important;
        text-align: left !important;
        width: 100%;
    }
}

/* 5) small polish: keep form box slightly narrower so button sits nicely inside */
.ch-form {
    max-width: 520px;
    margin: 0 auto;
}

/* 6) make sure dotted borders remain hidden (safety) */
fieldset, .woocommerce form .form-row, .ch-form fieldset {
    border: none !important;
    background: transparent !important;
}

/* ====== Mobile: Force full-width login box ====== */
@media (max-width: 480px) {

    /* Container luar (bungkus card putih) */
    .ch-account-wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 24px !important; /* jika ingin tetap rounded, ganti 0 → 20px */
    }

    /* Card putih utama */
    .ch-form {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 24px 18px !important;
        box-sizing: border-box !important;
        border-radius: 24px !important; /* ganti 0 → 20px kalau mau sudut tetap lembut */
    }

    /* Input agar tetap full width rapi */
    .ch-form .input-text {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Tombol tetap full width */
    .ch-btn-primary {
        width: 100% !important;
    }
}

/* ====== Mobile: Kotak putih lebih lebar + tetap rounded ====== */
@media (max-width: 480px) {

    /* Wrapper utama */
    .ch-account-wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 3px !important; /* beri ruang kecil agar kotak tidak nempel ke tepi */
        box-sizing: border-box !important;
    }

    /* Kotak putih (card) */
    .ch-form {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 28px 22px !important;
        border-radius: 28px !important; /* Rounded tetap elegan */
        box-sizing: border-box !important;
    }

    /* Input full width */
    .ch-form .input-text {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Tombol full width */
    .ch-btn-primary {
        width: 100% !important;
    }
}

/* ============================================
   FINAL MOBILE LOGIN - CHAIRHAVEN
   ============================================ */

@media (max-width: 768px) {
    
    /* 1. HAPUS SEMUA BACKGROUND GANDA */
    .woocommerce-account,
    .woocommerce-account .woocommerce,
    .ch-account-page,
    .ch-account-wrap,
    .ch-form,
    .woocommerce-form-login {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 2. KOTAK FORM UTAMA - FULL WIDTH */
    .woocommerce form.login {
        background: #ffffff !important;
        border-radius: 24px !important;
        box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
        padding: 40px 20px !important;
        width: calc(100% - 40px) !important;
        max-width: 100% !important;
        margin: 20px auto !important;
        box-sizing: border-box !important;
    }
    
    /* 3. JUDUL & DESKRIPSI - TENGAH */
    .woocommerce-form-login h2 {
        text-align: center !important;
        margin: 0 0 15px 0 !important;
        font-size: 1.8rem !important;
        width: 100% !important;
    }
    
    .woocommerce-form-login > p:first-of-type {
        text-align: center !important;
        margin-bottom: 30px !important;
        color: #666 !important;
        font-size: 15px !important;
        width: 100% !important;
    }
    
    /* 4. LABEL & INPUT - RATA KIRI */
    .woocommerce-form-login .form-row label {
        text-align: left !important;
        display: block !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        font-weight: 500 !important;
        font-size: 16px !important;
        color: #333 !important;
    }
    
    .woocommerce-form-login .input-text {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
        border-radius: 12px !important;
        border: 1px solid #ddd !important;
        font-size: 16px !important;
        margin-bottom: 5px !important;
        text-align: left !important;
    }
    
    /* 5. TOMBOL LOGIN - FULL WIDTH & TEKS TENGAH */
    .woocommerce-form-login .button {
        width: 100% !important;
        padding: 16px !important;
        border-radius: 40px !important;
        background: #0B7E8A !important;
        color: white !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        margin: 10px 0 20px 0 !important;
        border: none !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        text-align: center !important;
        display: block !important;
    }
    
    /* 6. REMEMBER ME & LOST PASSWORD - RATA KIRI */
    .woocommerce-form-login .woocommerce-form__label-for-checkbox {
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin-bottom: 15px !important;
        font-size: 15px !important;
        color: #333 !important;
        width: 100% !important;
    }
    
    .woocommerce-LostPassword {
        text-align: left !important;
        display: block !important;
        margin-bottom: 25px !important;
        font-size: 15px !important;
        width: 100% !important;
    }
    
    /* 7. DON'T HAVE AN ACCOUNT - DI TENGAH */
    .woocommerce-form-login > p:last-of-type {
        text-align: center !important;
        margin: 0 !important;
        font-size: 15px !important;
        color: #666 !important;
        padding-top: 15px !important;
        border-top: 1px solid #f0f0f0 !important;
        margin-top: 20px !important;
        width: 100% !important;
    }
}

/* ============================================
   VERY SMALL SCREENS (< 400px)
   ============================================ */
@media (max-width: 400px) {
    .woocommerce form.login {
        padding: 35px 15px !important;
        width: calc(100% - 30px) !important;
        margin: 15px auto !important;
        border-radius: 20px !important;
    }
    
    .woocommerce-form-login h2 {
        font-size: 1.6rem !important;
    }
    
    .woocommerce-form-login > p:first-of-type {
        font-size: 14px !important;
        margin-bottom: 25px !important;
    }
    
    .woocommerce-form-login .input-text {
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    .woocommerce-form-login .button {
        padding: 15px !important;
        font-size: 15px !important;
    }
}

/* ============================================
   PERBAIKAN EXTRA STRONG - 2 MASALAH SAJA
   ============================================ */

@media (max-width: 768px) {
    
    /* 1. PAKSA SEMUA LABEL RATA KIRI (KHUSUS EMAIL & PASSWORD) */
    .woocommerce form.login label,
    .woocommerce-form-login label,
    .woocommerce-form-login .form-row label,
    .woocommerce-form-login label[for="username"],
    .woocommerce-form-login label[for="password"] {
        text-align: left !important;
        text-align-last: left !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        display: block !important;
        float: none !important;
        width: 100% !important;
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
    }
    
    /* 2. PAKSA "DON'T HAVE AN ACCOUNT?" DI TENGAH */
    .woocommerce form.login > p:last-of-type,
    .woocommerce-form-login > p:last-of-type {
        text-align: center !important;
        text-align-last: center !important;
        display: block !important;
        margin: 20px auto 0 auto !important;
        padding: 15px 0 0 0 !important;
        width: 100% !important;
        border-top: 1px solid #f0f0f0 !important;
    }
}

@media (max-width: 768px) {
    /* Ini saja dulu */
    p.ch-alt {
        text-align: center !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    p.ch-alt {
        text-align: center !important;
        width: 100% !important;
        margin-top: 20px !important;
        padding-top: 15px !important;
        border-top: 1px solid #f0f0f0 !important;
    }
}

@media (max-width: 768px) {
    /* "Lost your password?" - Rata kiri sederhana */
    a.ch-lost {
        float: left !important;
        clear: left !important;
        margin-left: 0 !important;
    }
}
