/* =========================================================
   PRIMA MEMBRANE CALCULATOR CSS
   File: calculator.css
   ========================================================= */

#calculator-modal.pm-calculator-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none; /* Default Hidden */
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999999 !important; /* Pastikan selalu di atas */
    opacity: 0;
    transition: opacity 0.3s ease;
}

#calculator-modal.pm-calculator-modal.pm-open {
    display: flex !important;
    opacity: 1;
}

/* BACKDROP */
#calculator-modal .pm-calc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

/* WRAPPER */
#calculator-modal .pm-calc-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: #fff;
    border-radius: 14px;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#calculator-modal.pm-open .pm-calc-wrapper {
    transform: translateY(0);
}

/* HEADER */
#calculator-modal .pm-calc-header {
    padding: 20px;
    background: linear-gradient(135deg, #0a192f 0%, #1e3a8a 100%);
    color: white;
    text-align: center;
    border-bottom: 3px solid #f97316;
    position: relative;
}

#calculator-modal .pm-calc-title { margin: 0; font-size: 20px; font-weight: 800; }
#calculator-modal .pm-calc-title span { color: #f97316; }
#calculator-modal .pm-calc-subtitle { margin: 5px 0 0; font-size: 12px; color: #cbd5e1; }

/* CLOSE BUTTON */
#calculator-modal .pm-calc-close {
    position: absolute;
    top: 15px; right: 15px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
#calculator-modal .pm-calc-close:hover { background: #f97316; border-color: #f97316; }

/* BODY & FORM */
#calculator-modal .pm-calc-body { padding: 20px; }
#calculator-modal .pm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
#calculator-modal .pm-field { display: flex; flex-direction: column; margin-bottom: 15px;}
#calculator-modal .pm-field label { font-size: 11px; font-weight: bold; margin-bottom: 5px; color: #0a192f; }
#calculator-modal .pm-input-wrap { position: relative; width: 100%; }
#calculator-modal .pm-input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; font-size: 14px; box-sizing: border-box; }
#calculator-modal .pm-input:focus { border-color: #f97316; outline: none; box-shadow: 0 0 0 2px rgba(249,115,22,.15); }
#calculator-modal .pm-input-wrap span { position: absolute; right: 10px; top: 12px; font-size: 12px; color: #64748b; font-weight: bold;}
#calculator-modal .pm-field small { display: none; color: #ef4444; font-size: 10px; margin-top: 4px; }
#calculator-modal .pm-field small.show { display: block; }
#calculator-modal .is-error { border-color: #ef4444 !important; background: #fef2f2 !important; }

/* BUTTON */
#calculator-modal .pm-calc-submit {
    width: 100%; height: 48px; background: linear-gradient(135deg, #f97316, #ea580c);
    color: white; border: none; border-radius: 8px; font-weight: bold; font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;
}
#calculator-modal .pm-calc-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(249,115,22,0.3); }

/* RESULT */
#calculator-modal .pm-result { display: none; margin-top: 15px; padding: 15px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 8px; text-align: center; }
#calculator-modal .pm-result.pm-visible { display: block; }
#calculator-modal .pm-result-title { font-size: 11px; font-weight: bold; color: #1e3a8a; text-transform: uppercase; }
#calculator-modal .pm-result-price { font-size: 26px; font-weight: 800; color: #0a192f; margin: 8px 0; }
#calculator-modal .pm-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fff; padding: 10px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #e2e8f0; }
#calculator-modal .pm-breakdown small { font-size: 10px; color: #64748b; }
#calculator-modal .pm-breakdown strong { font-size: 13px; color: #0a192f; display: block; }
#calculator-modal .pm-note { font-size: 10px; color: #64748b; font-style: italic; }

/* WHATSAPP BUTTON */
#calculator-modal .pm-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #25d366; color: white !important; text-decoration: none;
    height: 44px; border-radius: 8px; font-weight: bold; font-size: 13px; margin-top: 10px;
}
#calculator-modal .pm-whatsapp svg { width: 20px; height: 20px; fill: white; }

@media (max-width: 480px) {
    #calculator-modal .pm-grid-2 { grid-template-columns: 1fr; gap: 10px; }
}