/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 12pt; /* Equivalent to Word 12pt */
    line-height: 1.6;
    color: #000;
    background-color: #e9e9e9;
    padding: 20px;
    display: flex;
    justify-content: center;
}

/* Main Document Container - Styled to look like A4 paper */
.container {
    background-color: #fff;
    max-width: 210mm;
    width: 100%;
    padding: 20mm;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Top Header Section */
.header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 30px;
}

h1 {
    font-size: 24pt;
    font-weight: 700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 35px;
    letter-spacing: 0.5px;
    text-transform: none;
}

.note {
    font-size: 11pt;
    margin-bottom: 30px;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Section Headers */
h2 {
    font-size: 14pt;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 12pt;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

li {
    margin-bottom: 10px;
    position: relative;
    line-height: 1.5;
}

/* Custom Checkbox Styling */
li label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

li input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #000;
    border-radius: 4px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    background-color: #fff;
}

li input[type="checkbox"]:checked {
    background-color: #000;
}

li input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Footer Notes */
.footer-note {
    font-size: 11pt;
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* External Link Button */
.button-container {
    text-align: center;
    margin-bottom: 30px;
}

.external-link {
    display: inline-block;
    background-color: #0066cc; /* Blue color */
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12pt;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid #0066cc;
    box-shadow: 0 4px 6px rgba(0, 102, 204, 0.2);
}

.external-link:hover {
    background-color: #005bb5;
    border-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 102, 204, 0.3);
}

/* Progress Bar Container */
.progress-container {
    background-color: #f0f4f8;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-text {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 11pt;
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #28a745; /* Green color */
    border-radius: 6px;
    transition: width 0.3s ease;
}

.reset-btn {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10pt;
    font-weight: bold;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background-color: #f8f9fa;
    border-color: #999;
}

/* Warning Box */
.warning-box {
    display: block;
    font-size: 10pt;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    text-align: left;
    line-height: 1.4;
}

/* -----------------------------------------------------------
   CUSTOM MODAL STYLES
   ----------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18pt;
    font-weight: bold;
    color: #333;
}

.modal-box p {
    margin-bottom: 25px;
    font-size: 11pt;
    color: #555;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 11pt;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex: 1;
}

.modal-btn-cancel {
    background-color: #f0f0f0;
    color: #333;
    border-color: #ccc;
}

.modal-btn-cancel:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.modal-btn-confirm {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.modal-btn-confirm:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* -----------------------------------------------------------
   PRINT SPECIFIC STYLES FOR A4 PAPER
   ----------------------------------------------------------- */
@page {
    size: A4;
    margin: 15mm;
    
    /* Firefox does NOT support this page numbering rule. 
       You must enable "Headers and Footers" in Firefox's print dialog. */
    @bottom-right {
        content: counter(page);
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 10pt;
    }
}

@media print {
    body {
        background-color: #fff;
        padding: 0;
        display: block;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Hide interactive elements when printing */
    .no-print, .modal-overlay {
        display: none !important;
    }
    
    /* Ensure checkboxes print clearly as empty boxes */
    li input[type="checkbox"] {
        border: 1px solid #000 !important;
        border-radius: 2px !important;
        background-color: #fff !important;
    }
    
    li input[type="checkbox"]:checked {
        background-color: #fff !important;
    }
    
    li input[type="checkbox"]:checked::after {
        display: none !important;
    }
    
    h2 {
        page-break-after: avoid;
        break-after: avoid;
        margin-top: 25px;
    }
    
    h2:first-of-type {
        margin-top: 0;
    }

    ul {
        page-break-inside: auto;
    }
    
    li {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}