/* ==================================================
   HEMRITU — CUSTOMER ACCESS MODULE
   COMPLETE REPLACEMENT
================================================== */


/* ==================================================
   MODULE
================================================== */

.hemritu-customer-access{
    width:100%;
    margin:0;
    box-sizing:border-box;
}


/* ==================================================
   MAIN CARD
================================================== */

.hemritu-customer-access-card{
    display:grid;

    grid-template-columns:
        48px
        minmax(0,1fr)
        auto;

    grid-template-areas:
        "icon content actions"
        "guest guest guest";

    align-items:center;

    gap:
        16px
        18px;

    width:100%;

    padding:20px 22px;

    background:
        linear-gradient(
            135deg,
            #f4fbf7 0%,
            #ffffff 65%
        );

    border:1px solid #cfe5d8;
    border-radius:12px;

    box-sizing:border-box;

    box-shadow:
        0 8px 28px
        rgba(24,121,78,.055);
}


/* ==================================================
   ICON
================================================== */

.hemritu-customer-access-icon{
    grid-area:icon;

    display:flex;
    align-items:center;
    justify-content:center;

    width:48px;
    height:48px;

    background:#18794e;
    color:#ffffff;

    border-radius:50%;

    font-size:18px;
    font-weight:700;
    line-height:1;

    box-sizing:border-box;

    box-shadow:
        0 7px 18px
        rgba(24,121,78,.18);
}


/* ==================================================
   CONTENT
================================================== */

.hemritu-customer-access-content{
    grid-area:content;

    min-width:0;
}


.hemritu-customer-access-label{
    display:block;

    margin:0 0 5px;

    color:#18794e;

    font-size:8px;
    font-weight:700;
    line-height:1.2;

    letter-spacing:1.3px;
    text-transform:uppercase;
}


.hemritu-customer-access-title{
    display:block;

    margin:0 0 4px;

    color:#145c3d;

    font-size:15px;
    font-weight:700;
    line-height:1.35;
}


.hemritu-customer-access-content p{
    margin:0 !important;
    padding:0 !important;

    color:#6f7f76;

    font-size:11px;
    line-height:1.55;
}


/* ==================================================
   LOGIN / CREATE ACCOUNT ACTIONS
================================================== */

.hemritu-customer-access-actions{
    grid-area:actions;

    display:flex;
    align-items:center;
    justify-content:flex-end;

    gap:10px;

    flex-wrap:nowrap;
}


.hemritu-customer-access-actions a{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:42px;

    margin:0;
    padding:0 18px;

    border-radius:6px;

    font-size:9px;
    font-weight:700;
    line-height:1;

    letter-spacing:.45px;
    text-transform:uppercase;

    text-decoration:none !important;

    white-space:nowrap;

    box-sizing:border-box;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}


/* LOGIN */

.hemritu-customer-login-button{
    background:#18794e;
    color:#ffffff !important;

    border:1px solid #18794e;
}


.hemritu-customer-login-button:hover{
    background:#12623f;
    color:#ffffff !important;

    border-color:#12623f;
}


/* CREATE ACCOUNT */

.hemritu-customer-register-button{
    background:#ffffff;
    color:#18794e !important;

    border:1px solid #b9d8c6;
}


.hemritu-customer-register-button:hover{
    background:#f4fbf7;
    color:#145c3d !important;

    border-color:#18794e;
}


/* MY ACCOUNT */

.hemritu-customer-account-button{
    background:#18794e;
    color:#ffffff !important;

    border:1px solid #18794e;
}


.hemritu-customer-account-button:hover{
    background:#12623f;
    color:#ffffff !important;

    border-color:#12623f;
}


/* ==================================================
   GUEST CHECKOUT OPTION
================================================== */

.hemritu-customer-guest-option{
    grid-area:guest;

    display:flex;
    align-items:center;

    width:100%;

    gap:14px;

    margin:0;
    padding:14px 0 0;

    border-top:1px solid #dcebe2;

    box-sizing:border-box;
}


/* OR DIVIDER */

.hemritu-customer-guest-divider{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    flex:0 0 auto;

    margin:0;
    padding:0;
}


.hemritu-customer-guest-divider span{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:30px;
    height:24px;

    padding:0 8px;

    background:#eef8f2;
    color:#18794e;

    border:1px solid #d2e8dc;
    border-radius:20px;

    font-size:8px;
    font-weight:700;
    line-height:1;

    letter-spacing:.6px;
}


/* GUEST CHECKOUT BUTTON */

.hemritu-customer-guest-checkout-button{
    appearance:none;
    -webkit-appearance:none;

    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;

    flex:1 1 auto !important;

    width:auto !important;
    max-width:none !important;

    min-height:44px !important;
    height:auto !important;

    margin:0 !important;
    padding:0 15px !important;

    background:#ffffff !important;
    color:#145c3d !important;

    border:1px solid #b9d8c6 !important;
    border-radius:7px !important;

    box-shadow:none !important;

    font-size:10px !important;
    font-weight:700 !important;
    line-height:1.3 !important;

    letter-spacing:.2px !important;
    text-align:left !important;
    text-transform:none !important;

    white-space:normal !important;

    cursor:pointer;

    box-sizing:border-box !important;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}


.hemritu-customer-guest-checkout-button:hover{
    background:#f4fbf7 !important;
    color:#12623f !important;

    border-color:#18794e !important;

    box-shadow:
        0 5px 16px
        rgba(24,121,78,.08)
        !important;
}


/* GUEST BUTTON TEXT */

.hemritu-customer-guest-checkout-text{
    display:block;

    min-width:0;
}


/* ARROW */

.hemritu-customer-guest-checkout-arrow{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    flex:0 0 28px;

    width:28px;
    height:28px;

    margin-left:12px;

    background:#eaf6ef;
    color:#18794e;

    border-radius:50%;

    font-size:14px;
    font-weight:700;
    line-height:1;

    transition:
        transform .25s ease,
        background .2s ease;
}


/* OPEN STATE */

.hemritu-customer-guest-checkout-button[
    aria-expanded="true"
]
.hemritu-customer-guest-checkout-arrow{
    transform:rotate(180deg);

    background:#18794e;
    color:#ffffff;
}


/* ==================================================
   LOGGED-IN CUSTOMER

   No guest row exists in PHP for logged-in users,
   so the card remains one compact row.
================================================== */

.hemritu-customer-access.is-logged-in
.hemritu-customer-access-card{
    grid-template-areas:
        "icon content actions";

    background:
        linear-gradient(
            135deg,
            #f4fbf7 0%,
            #ffffff 65%
        );

    border-color:#cfe5d8;
}


.hemritu-customer-access.is-logged-in
.hemritu-customer-access-icon{
    background:#18794e;
}


.hemritu-customer-access.is-logged-in
.hemritu-customer-access-label{
    color:#18794e;
}


/* ==================================================
   CHECKOUT CONTEXT
================================================== */

body.woocommerce-checkout
.hemritu-customer-access{
    width:100%;
    max-width:none;
}


body.woocommerce-checkout
.hemritu-customer-access-actions a{
    float:none !important;
}


/* ==================================================
   TABLET
================================================== */

@media (max-width:991px){

    .hemritu-customer-access-card{
        grid-template-columns:
            46px
            minmax(0,1fr)
            auto;

        gap:
            14px
            15px;

        padding:18px;
    }


    .hemritu-customer-access-icon{
        width:46px;
        height:46px;
    }


    .hemritu-customer-access-actions a{
        padding:0 14px;
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width:767px){


    /* MAIN CARD */

    .hemritu-customer-access-card{
        grid-template-columns:
            40px
            minmax(0,1fr);

        grid-template-areas:
            "icon content"
            "actions actions"
            "guest guest";

        align-items:start;

        gap:
            12px
            11px;

        padding:15px;

        border-radius:10px;
    }


    /* ICON */

    .hemritu-customer-access-icon{
        width:40px;
        height:40px;

        font-size:15px;
    }


    /* CONTENT */

    .hemritu-customer-access-label{
        margin-bottom:4px;

        font-size:7px;

        letter-spacing:1px;
    }


    .hemritu-customer-access-title{
        margin-bottom:3px;

        font-size:13px;
        line-height:1.35;
    }


    .hemritu-customer-access-content p{
        font-size:9px;
        line-height:1.5;
    }


    /* LOGIN + CREATE ACCOUNT */

    .hemritu-customer-access-actions{
        display:grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            );

        width:100%;

        gap:8px;

        margin-top:2px;
    }


    .hemritu-customer-access-actions a{
        width:100%;

        min-width:0;
        min-height:40px;

        padding:0 8px;

        font-size:8px;
    }


    /* LOGGED-IN = ONE BUTTON */

    .hemritu-customer-access.is-logged-in
    .hemritu-customer-access-card{
        grid-template-areas:
            "icon content"
            "actions actions";
    }


    .hemritu-customer-access.is-logged-in
    .hemritu-customer-access-actions{
        grid-template-columns:1fr;
    }


    /* GUEST OPTION */

    .hemritu-customer-guest-option{
        display:block;

        padding-top:12px;

        border-top:1px solid #dcebe2;
    }


    /* OR */

    .hemritu-customer-guest-divider{
        display:flex;

        width:100%;

        margin:0 0 8px;
    }


    .hemritu-customer-guest-divider span{
        min-width:28px;
        height:22px;

        font-size:7px;
    }


    /* GUEST BUTTON */

    .hemritu-customer-guest-checkout-button{
        width:100% !important;

        min-height:42px !important;

        padding:0 12px !important;

        font-size:9px !important;
    }


    .hemritu-customer-guest-checkout-arrow{
        flex-basis:26px;

        width:26px;
        height:26px;

        margin-left:8px;

        font-size:13px;
    }

}