/* =========================================
   DEFAULT STYLES (Screen View)
========================================= */
.vlm-paper-form {
    border: 3px solid #000;
    padding: 25px;
    background: #fff;
    font-family: 'Courier New', Courier, monospace;
    max-width: 800px;
    margin: 20px auto;
    position: relative;
    border-radius: 5px;
    box-sizing: border-box;
}

.vlm-header-pill {
    border: 2px solid #000;
    border-radius: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    width: fit-content;
    padding: 5px 20px;
    margin: 0 auto 30px auto;
    background: #fff;
    max-width: 90%;
}

.vlm-form-row { margin-bottom: 15px; display: flex; align-items: baseline; width: 100%; }
.vlm-flex-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 15px; width: 100%; }
.vlm-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.vlm-flex-item { flex: 1; display: flex; align-items: baseline; min-width: 0; }

label { font-weight: bold; color: #000; white-space: nowrap; margin-right: 5px; font-size: 14px; }
.vlm-dotted-input { 
    border: none !important; border-bottom: 2px dotted #000 !important; 
    background: transparent !important; flex-grow: 1; border-radius: 0 !important; 
    padding: 0 5px !important; min-width: 50px; height: 30px; color: #000 !important; 
}
.vlm-select { border: 1px solid #ccc; border-bottom: 2px dotted #000; background: transparent; width: 100%; padding: 5px; }

.vlm-blue-note { 
    background: #1a237e; color: #fff; padding: 10px; text-align: center; 
    font-weight: bold; margin: 20px 0; font-size: 14px; 
}
.vlm-box-row { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.vlm-box { border: 1px solid #000; padding: 10px; flex: 1; }
.vlm-box-input { width: 100%; border: none; background: #eee; margin-top: 5px; padding: 5px; }

.table-responsive { overflow-x: auto; }
.vlm-fee-table { width: 100%; border-collapse: collapse; margin-top: 20px; border: 1px solid #000; }
.vlm-fee-table th { background: #1a237e; color: white; padding: 8px; border: 1px solid #000; text-align: center; }
.vlm-fee-table td { border: 1px solid #000; text-align: center; padding: 8px; }

.vlm-objectives { margin-top: 20px; font-size: 14px; }
.vlm-objectives ol { margin-left: 20px; }
.vlm-submit-btn { background: #1a237e; color: white; padding: 12px 25px; border: none; cursor: pointer; font-size: 16px; margin-top: 20px; width: 100%; font-weight: bold; }

/* Mobile */
@media screen and (max-width: 768px) {
    .vlm-paper-form { padding: 15px; margin: 10px; }
    .vlm-address-grid { grid-template-columns: 1fr; gap: 15px; }
    .vlm-flex-row { flex-direction: column; gap: 15px; }
    .vlm-flex-item { width: 100%; flex-direction: column; align-items: flex-start; }
    .vlm-dotted-input { width: 100% !important; margin-top: 5px; }
    .vlm-box-row { flex-direction: column; }
}

/* =========================================
   PRINT SETTINGS (THE FIX)
========================================= */
@media print {
    /* 1. Reset Page Margins to remove headers/footers space */
    @page {
        margin: 0.5cm;
        size: auto;
    }

    /* 2. Hide WordPress Interfaces completely */
    body, #wpwrap { background: #fff !important; }
    #adminmenumain, #wpadminbar, #wpfooter, .update-nag, .notice, .screen-reader-text, #wp-auth-check-wrap {
        display: none !important;
    }
    
    /* 3. SPECIFICALLY HIDE THE BUTTONS */
    .vlm-back-btn, button, .button, input[type="submit"] {
        display: none !important;
    }

    /* 4. Reset WordPress Content Containers */
    #wpcontent, #wpbody-content, .wrap {
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }

    /* 5. Position the Form to take over the whole page */
    .vlm-paper-form {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        border: 3px solid #000 !important;
        box-shadow: none !important;
        z-index: 9999; /* Sit on top of everything */
    }

    /* 6. Force Background Colors (Browsers often remove them) */
    .vlm-blue-note, .vlm-fee-table th {
        background-color: #1a237e !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}