/* ================================
   GLOBAL HARD FIXES
================================ */
.healthfirst-id-wrapper,
.healthfirst-id-wrapper *{
    box-sizing:border-box;
}

.healthfirst-id-wrapper{
    width:100%;
    display:flex;
    justify-content:center;
    padding:25px;
    overflow-x:hidden;
}

/* ================================
   CARD (DESKTOP)
================================ */
.healthfirst-id-card{
    width:100%;
    max-width:820px;
    background:#f4fff8;
    border-radius:30px;
    padding:30px;
    box-shadow:0 18px 40px rgba(0,0,0,.15);
    font-family:Arial, sans-serif;
    text-align:center;
    position:relative;
    overflow:hidden;
}

/* ================================
   DARK TOGGLE
================================ */
.healthfirst-id-dark-toggle{
    position:absolute;
    top:16px;
    right:16px;
    border:none;
    background:#222;
    color:#fff;
    padding:7px 16px;
    border-radius:20px;
    font-size:12px;
    cursor:pointer;
    z-index:5;
}

/* ================================
   HEADINGS
================================ */
.healthfirst-id-card h2{
    color:#1a7f37;
    font-size:22px;
    margin:0;
}

.healthfirst-id-sub{
    font-size:15px;
    color:#444;
    margin:6px 0 0;
}

/* ================================
   INPUT & BUTTON
================================ */
#healthfirst-id-input{
    width:100%;
    padding:22px;
    border-radius:45px;
    border:2px solid #1a7f37;
    font-size:16px !important;
    line-height:1.2;
    -webkit-text-size-adjust:100%;
    touch-action:manipulation;
    margin-top:16px; /* desktop spacing */
}

#healthfirst-id-btn{
    margin-top:18px;
    padding:20px 60px;
    border-radius:34px;
    background:#1a7f37;
    color:#fff;
    border:none;
    font-size:16px !important;
    cursor:pointer;
    touch-action:manipulation;
}

/* ================================
   SPINNER
================================ */
.healthfirst-id-spinner{
    display:none;
    margin:22px auto;
    width:42px;
    height:42px;
    border:5px solid #d6f5e3;
    border-top:5px solid #1a7f37;
    border-radius:50%;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    to{transform:rotate(360deg)}
}

/* ================================
   RESULT PANEL
================================ */
#healthfirst-id-result{
    margin-top:24px;
    background:#fff;
    border-radius:24px;
    padding:20px;
    text-align:left;
}

.healthfirst-id-row{
    display:flex;
    justify-content:space-between;
    padding:10px 0;
    border-bottom:1px dashed #ddd;
}

.healthfirst-id-row:last-child{border-bottom:none}
.healthfirst-id-row span{font-weight:bold;color:#555}
.healthfirst-id-row strong{color:#222}

/* ================================
   GUIDE + IMAGE
================================ */
.healthfirst-id-guide{
    margin-top:30px;
    text-align:left;
}

.healthfirst-id-guide h3{
    color:#1a7f37;
    font-size:16px;
}

.healthfirst-id-card-img{
    margin-top:16px;
    display:flex;
    justify-content:center;
    position:relative;
}

.healthfirst-id-card-img img{
    width:340px;
    height:190px;
    max-width:100%;
    object-fit:contain;
    border-radius:20px;
}

.healthfirst-id-highlight{
    position:absolute;
    bottom:12px;
    right:12px;
    background:#1a7f37;
    color:#fff;
    padding:7px 16px;
    border-radius:16px;
    font-size:12px;
}

/* ================================
   FOOTER
================================ */
.healthfirst-id-disclaimer{
    font-size:12px;
    color:#555;
    margin-top:18px;
}

.healthfirst-id-brand{
    display:block;
    margin-top:10px;
    font-size:12px;
    color:#1a7f37;
    font-weight:bold;
}

/* ================================
   DARK MODE
================================ */
.healthfirst-id-dark{
    background:#1b1b1b;
    color:#eee;
}

.healthfirst-id-dark h2,
.healthfirst-id-dark h3,
.healthfirst-id-dark .healthfirst-id-brand{
    color:#4cd964;
}

.healthfirst-id-dark #healthfirst-id-input{
    background:#333;
    color:#fff;
    border-color:#4cd964;
}

.healthfirst-id-dark #healthfirst-id-result{
    background:#2a2a2a;
}

/* ================================
   📱 MOBILE – POLISHED FIX
================================ */
@media screen and (max-width:600px){

    html, body{
        overflow-x:hidden;
    }

    .healthfirst-id-wrapper{
        padding:0 !important;
        margin:0 !important;
        width:100% !important;
    }

    .healthfirst-id-card{
        width:100% !important;
        max-width:100% !important;
        border-radius:0 !important;
        padding:52px 14px 20px !important; /* space for dark button */
        box-shadow:none !important;
    }

    /* Dark toggle safe */
    .healthfirst-id-dark-toggle{
        top:10px !important;
        right:10px !important;
        font-size:11px;
        padding:6px 14px;
    }

    /* 🔧 FIXED: smaller heading + no extra gap */
    .healthfirst-id-card h2{
        font-size:17px !important;
        margin-bottom:2px !important;
    }

    .healthfirst-id-sub{
        font-size:12px !important;
        margin-bottom:6px !important;
    }

    /* 🔧 REMOVE GAP BETWEEN TITLE & INPUT */
    #healthfirst-id-input{
        margin-top:8px !important;
        font-size:16px !important;
        padding:20px !important;
    }

    #healthfirst-id-btn{
        font-size:16px !important;
        padding:18px 44px !important;
    }

    .healthfirst-id-row{
        flex-direction:column !important;
        gap:4px;
    }

    .healthfirst-id-row span{
        font-size:13px !important;
    }

    .healthfirst-id-row strong{
        font-size:14px !important;
    }

    .healthfirst-id-card-img img{
        width:100% !important;
        max-width:320px !important;
        height:auto !important;
    }

    .healthfirst-id-disclaimer,
    .healthfirst-id-brand{
        font-size:11px !important;
    }
}
