/* ======================================================
   Mesaage Template Composer
   Style Version 2.0
   ====================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{

    color-scheme: light only;

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

}

html, body{

    overflow-x: hidden;

    width: 100%;

}

h3{

    margin-top:25px;

    margin-bottom:15px;

    padding:12px 15px;

    background:#E3F2FD;

    color:#0D47A1;

    border-left:5px solid #1565C0;

    border-radius:8px;

    font-size:18px;

    font-weight:bold;

}

body{

    font-family:Arial, Helvetica, sans-serif;

    font-size:16px;

    color:#333;

    background-image:
        linear-gradient(
            rgba(255,255,255,.85),
            rgba(255,255,255,.88)
        ),
        url("https://masjidkarangkajen.com/Nitip_file/Images_rahmatmh/Ruang_Perkuliahan_Fakultas_Psikologi_dan_Fakultas_Ilmu_Sosial_Budaya_dengan_Batik_UII.png");

    background-size:cover;

    background-position:center;

    background-attachment:fixed;

    background-repeat:no-repeat;

}

/* ======================================================
   HEADER
   ====================================================== */

header{
    background:#1565C0;
    color:#fff;
    padding:20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1{
    font-size:28px;
    margin-bottom:6px;
}

header p{
    opacity:.9;
    font-size:15px;
}

/* ======================================================
   CONTENT
   ====================================================== */

main{
    max-width:1000px;
    margin:auto;
    padding:30px 20px;
    min-height:75vh;
}

/* ======================================================
   CARD
   ====================================================== */

.card{
    background:#fff;
    border-radius:15px;
    padding:25px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.card h2{
    margin-bottom:10px;
}

.card p{
    color:#666;
    margin-bottom:20px;
    line-height:1.6;
}

/* ======================================================
   MENU GRID
   ====================================================== */

.menu-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));

    gap:20px;

    margin-top:25px;

}

/* ======================================================
   MENU BUTTON
   ====================================================== */

.menu-btn{

    background:#fff;

    border:1px solid #e5e7eb;

    border-radius:15px;

    padding:22px;

    cursor:pointer;

    transition:.25s ease;

    text-align:left;

    box-shadow:0 2px 10px rgba(0,0,0,.05);

}

.menu-btn:hover{

    background:#f5faff;

    border-color:#1565C0;

    transform:translateY(-6px);

    box-shadow:0 12px 30px rgba(0,0,0,.18);

}

.menu-icon{

    width:42px;

    height:42px;

    display:flex;

    align-items:center;

    justify-content:center;

    margin-bottom:15px;

    font-size:36px;

}

/* ======================================================
   MENU LOGO
====================================================== */

.menu-logo{

    width:42px;
    height:42px;

    object-fit:contain;

    display:block;

}

.menu-title{

    font-size:20px;

    font-weight:bold;

    margin-bottom:5px;

    color:#1565C0;

}

.menu-subtitle{

    font-size:14px;

    color:#666;

}

/* ======================================================
   BUTTON
   ====================================================== */

button{

    font-family:inherit;

}

.btn{

    background:#1565C0;

    color:white;

    border:none;

    border-radius:10px;

    padding:12px 22px;

    cursor:pointer;

    transition:.25s;

    font-size:15px;

    font-weight:bold;

}

.btn:hover{

    background:#0D47A1;

}

/* ======================================================
   TEXTAREA
   ====================================================== */

textarea{

    width:100%;

    min-height:180px;

    resize:vertical;

    padding:15px;

    border:1px solid #d6d6d6;

    border-radius:12px;

    font-size:15px;

    font-family:inherit;

    line-height:1.7;

    transition:.2s;

}

textarea:focus{

    outline:none;

    border-color:#1565C0;

    box-shadow:0 0 0 3px rgba(21,101,192,.15);

}

/* ======================================================
   INPUT
====================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select{

    width:100%;

    padding:10px 12px;

    border:1px solid #ccc;

    border-radius:8px;

    font-size:15px;

    font-family:inherit;

    transition:.2s;

}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus{

    outline:none;

    border-color:#1565C0;

    box-shadow:0 0 0 3px rgba(21,101,192,.15);

}

/* ======================================================
   CHECKBOX
   ====================================================== */

.checkbox-group{

    display:flex;

    flex-direction:column;

    gap:12px;

    margin:20px 0;

}

.checkbox-group label{

    cursor:pointer;

}

.checkbox-group label{

    display:flex;

    align-items:center;

    gap:10px;

    padding:8px 5px;

}

/* ======================================================
   PREVIEW
   ====================================================== */

.preview{

    background:#fafafa;

    border:1px solid #ddd;

    border-radius:10px;

    padding:15px;

    min-height:220px;

    white-space:pre-wrap;

    line-height:1.8;

}

/* ======================================================
   ACTION BUTTON
   ====================================================== */

.action{

    display:flex;

    justify-content:flex-end;

    gap:12px;

    margin-top:25px;

}

/* ======================================================
   FOOTER
   ====================================================== */

footer{

    background:#eee;

    padding:15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));

    text-align:center;

    color:#666;

    font-size:14px;

}

/* ======================================================
   SELIPKAN KATA
   ====================================================== */

.phrase-group{

    display:flex;

    flex-direction:row;

    flex-wrap:wrap;

    gap:10px;

}

.phrase-btn{

    background:#E3F2FD;

    color:#0D47A1;

    font-weight:600;

    padding:10px 16px;

    font-size:14px;

    border-radius:10px;

    line-height:1.4;

}

.phrase-btn:hover{

    background:#BBDEFB;

}

.phrase-btn.active{

    background:#1565C0;

    color:#fff;

}

.phrase-btn.active:hover{

    background:#0D47A1;

}

.emoji-btn{

    font-size:22px !important;

    padding:8px 12px !important;

    line-height:1.2;

    min-width:46px;

}

/* ======================================================
   COLLAPSIBLE SECTION (Selipkan Kata & Selipkan Emoji)
   ====================================================== */

.collapsible-header{

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:space-between;

    user-select:none;

}

.collapsible-header:hover{

    background:#D2E9FB;

}

.collapse-arrow{

    font-size:14px;

    margin-left:10px;

}

.collapsible-body{

    padding-top:5px;

}

/* ======================================================
   HALAMAN SEMUA EMOJI
   ====================================================== */

.emoji-tabs{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

    margin-bottom:10px;

}

.emoji-tab{

    font-size:22px;

    padding:8px 14px;

    background:#F0F4F8;

    border-radius:10px;

}

.emoji-tab.active{

    background:#1565C0;

    box-shadow:0 0 0 2px #90CAF9;

}

.emoji-panel{

    display:grid;

    grid-template-columns:repeat(auto-fill, minmax(48px, 1fr));

    gap:6px;

}

.emoji-grid-btn{

    font-size:26px;

    padding:8px 0;

    background:#F5F8FC;

    border:1px solid #E0E7EF;

    border-radius:8px;

    cursor:pointer;

    transition:.15s;

}

.emoji-grid-btn:hover{

    background:#E3F2FD;

    transform:scale(1.1);

}

/* ======================================================
   MOBILE
   ====================================================== */

@media(max-width:768px){

header{

    padding:16px;

}

header h1{

    font-size:22px;

}

header p{

    font-size:13px;

}

main{

    padding:16px 12px;

}

/* -----------------------------------------------------
   PERBESAR TEKS AGAR LEBIH TERBACA DI HP
------------------------------------------------------ */

label{

    display:block;

    font-size:17px;

    font-weight:600;

    color:#444;

    margin-bottom:6px;

}

p{

    font-size:16px !important;

    line-height:1.6 !important;

}

.card p{

    font-size:16px !important;

}

.card{

    animation:fadeIn .35s ease;

    background:#fff;

    border-radius:14px;

    padding:18px;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

}

@keyframes fadeIn{

    from{

        opacity:0;
        transform:translateY(15px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}

.menu-grid{

    grid-template-columns:1fr;

    gap:14px;

}

.menu-icon{

    font-size:34px;

}

h3{

    font-size:18px;

    padding:10px 12px;

    margin-top:18px;

    margin-bottom:10px;

}

textarea{

    min-height:140px;

    padding:12px;

}

.action{

    flex-direction:column-reverse;

    gap:10px;

}

.action .btn{

    width:100%;

}

/* -----------------------------------------------------
   CEGAH AUTO-ZOOM SAAT TAP INPUT (khas iPhone/Safari)
   Aturan: font-size input minimal 16px di layar mobile
------------------------------------------------------ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea,
.uii-input{

    font-size:17px !important;

    min-height:48px;

}

textarea{

    min-height:120px;

}

/* -----------------------------------------------------
   PERBESAR TARGET SENTUH (tombol, checkbox, radio)
------------------------------------------------------ */

.btn{

    min-height:46px;

}

.checkbox-group label{

    padding:10px 6px;

    gap:12px;

}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"]{

    width:20px;
    height:20px;
    flex-shrink:0;

}

.checkbox-group{

    gap:8px;

}

.phrase-btn{

    font-size:15px;

    padding:12px 18px;

    flex:1 1 auto;

    text-align:center;

}

.phrase-btn.emoji-btn{

    flex:0 0 auto;

}

.phrase-group{

    gap:10px;

}

/* sapaan row: dropdown + tombol info tetap sejajar tapi ringkas */
.checkbox-group[style*="row"] button,
button.btn[onclick="sapaanInfo()"]{

    padding:10px 14px;

    flex-shrink:0;

}

}

@media(max-width:480px){

header h1{

    font-size:19px;

}

.card{

    padding:14px;

}

.menu-title{

    font-size:17px;

}

.menu-subtitle{

    font-size:13px;

}

.btn{

    padding:11px 16px;

    font-size:14px;

}

h3{

    font-size:16px;

}

.phrase-btn:not(.emoji-btn){

    font-size:15px;

    padding:13px 16px;

    flex:1 1 100%;

}

.emoji-btn{

    font-size:24px !important;

    padding:6px 10px !important;

    flex:0 0 auto;

    min-width:44px;

}

.emoji-group{

    justify-content:flex-start;

}

}

.auto-grow{

    min-height:42px;

    overflow:hidden;

    resize:none;

}

/* ======================================================
   UIIGUEST
====================================================== */

.uii-section{

    margin-top:25px;

    margin-bottom:15px;

    padding:12px 15px;

    background:#E3F2FD;

    color:#0D47A1;

    border-left:5px solid #1565C0;

    border-radius:8px;

    font-size:18px;

    font-weight:bold;

}

.uii-input{

    width:100%;

    padding:10px 12px;

    border:1px solid #ccc;

    border-radius:8px;

    font-size:15px;

    font-family:inherit;

    transition:.2s;

}

.uii-input:focus{

    outline:none;

    border-color:#1565C0;

    box-shadow:0 0 0 3px rgba(21,101,192,.15);

}

/* ------------------------------------------------------
   RAPIKAN JARAK ANTAR KOTAK ISIAN DI PENGAJUAN UIIGUEST
   (sebelumnya kelas .form-row belum punya style sama sekali)
------------------------------------------------------ */

.form-row{

    margin-bottom:12px;

}

.form-row label{

    display:block;

    margin-bottom:6px;

}

/* beri jarak secukupnya di label & kotak isian yang ditulis
   manual (tanpa .form-row), misal di Durasi, Bandwidth,
   Login UIIGuest, PIC */

.card label{

    display:inline-block;

    margin-top:6px;

    margin-bottom:4px;

}

.card input[type="text"],
.card input[type="date"],
.card input[type="email"],
.card select.uii-input,
.card textarea{

    margin-bottom:2px;

}

/* ------------------------------------------------------
   CHIP LOKASI (multi-pilih)
------------------------------------------------------ */

.chip-container{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

}

.location-chip{

    display:inline-flex;

    align-items:center;

    gap:8px;

    background:#E3F2FD;

    color:#0D47A1;

    font-size:14px;

    font-weight:600;

    padding:8px 10px 8px 14px;

    border-radius:20px;

}

.location-chip button{

    background:#1565C0;

    color:#fff;

    border:none;

    border-radius:50%;

    width:20px;

    height:20px;

    font-size:11px;

    line-height:1;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

}

.location-chip button:hover{

    background:#0D47A1;

}