/* ============================================================
   Pengumuman Kelulusan — Minimal CSS (Tailwind handles most styling)
   ============================================================ */

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

/* Honeypot field - hidden from users */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ============================================================
   PRINT CERTIFICATE — Formal SKL Document
   ============================================================ */
.print-certificate {
    display: none;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.print-border {
    border: 3px double #1a1a1a;
    padding: 40px 48px;
    max-width: 800px;
    margin: 0 auto;
}

.print-header {
    text-align: center;
    margin-bottom: 8px;
}

.print-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
}

.print-school-name {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00236f;
}

.print-subtitle {
    font-size: 12px;
    color: #555;
    letter-spacing: 0.5px;
}

.print-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #00236f, transparent);
    margin: 16px 0 24px;
}

.print-title {
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.print-year {
    text-align: center;
    font-size: 13px;
    color: #444;
    margin-bottom: 24px;
}

.print-body {
    text-align: left;
}

.print-status {
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 20px 0 12px;
    padding: 12px;
    border-radius: 4px;
}

.print-lulus {
    color: #137333;
    background: #e6f4ea;
    border: 2px solid #137333;
}

.print-tidak {
    color: #c5221f;
    background: #fce8e6;
    border: 2px solid #c5221f;
}

.print-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.print-data {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 20px;
    font-size: 14px;
}

.print-data tr {
    height: 32px;
}

.print-label {
    font-weight: 700;
    white-space: nowrap;
    vertical-align: top;
    padding: 4px 0;
    width: 200px;
}

.print-dots {
    padding: 4px 8px;
    vertical-align: top;
    width: 24px;
}

.print-value {
    font-weight: 400;
    vertical-align: top;
    padding: 4px 0;
    border-bottom: 1px dotted #ccc;
}

.print-note {
    font-size: 12px;
    color: #555;
    font-style: italic;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.print-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
    padding-top: 16px;
}

.print-date {
    font-size: 13px;
    color: #333;
}

.print-signature {
    text-align: center;
    width: 200px;
}

.print-sign-line {
    width: 160px;
    height: 1px;
    background: #000;
    margin: 0 auto 6px;
}

.print-sign-title {
    font-size: 13px;
    font-weight: 700;
}

/* Suppress browser's default header/footer URL (localhost/kelulusan/index.php) - @page margin 0 hides browser URL */
@page {
    size: A4;
    margin: 0;
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Hide everything except certificate */
    header, nav, footer, .no-print,
    section, .faq-item, button, a, [onclick] {
        display: none !important;
    }

    main {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
    }

    /* Show only certificate - padding acts as page margin since @page margin is 0 */
    .print-certificate {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 9999;
        padding: 12mm;
        overflow: auto;
        box-sizing: border-box;
    }

    .print-border {
        border: 3px double #1a1a1a !important;
        box-shadow: none !important;
        margin: 0 auto;
        page-break-inside: avoid;
    }

    /* Force colors for print */
    .print-lulus {
        background: #e6f4ea !important;
        color: #137333 !important;
        border-color: #137333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-tidak {
        background: #fce8e6 !important;
        color: #c5221f !important;
        border-color: #c5221f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-school-name {
        color: #00236f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-divider {
        background: linear-gradient(to right, transparent, #00236f, transparent) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Print button hover effect */
@media screen {
    button[onclick="printSKL()"]:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
    }
}
