/* 
 * Global font size reduction
 * Reduces all font sizes to 75% of their original size
 * Excludes print media to preserve invoice and statement printing
 */

/* Only apply these styles for screen media, not for print */
@media screen {
    html {
        /* Set the base font size to 75% of the default */
        font-size: 75%;
    }
    
    /* Adjust specific elements that might need special handling */
    .form-control, .form-select, .btn, .input-group-text {
        font-size: 0.875rem; /* Slightly larger than base reduction for better readability in forms */
    }
    
    /* Ensure table content remains readable */
    table {
        font-size: 0.875rem;
    }
    
    /* Keep navbar items readable */
    .navbar {
        font-size: 0.9rem;
    }
    
    /* Adjust headings proportionally */
    h1 { font-size: 2.25rem; }  /* 75% of 3rem */
    h2 { font-size: 1.8rem; }   /* 75% of 2.4rem */
    h3 { font-size: 1.5rem; }   /* 75% of 2rem */
    h4 { font-size: 1.2rem; }   /* 75% of 1.6rem */
    h5 { font-size: 0.9rem; }   /* 75% of 1.2rem */
    h6 { font-size: 0.75rem; }  /* 75% of 1rem */
    
    /* Reduce button heights */
    .btn {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
        line-height: 1.2;
    }
    
    /* Specific adjustments for small buttons */
    .btn-sm {
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
        line-height: 1.1;
    }
    
    /* Adjust action buttons in tables and forms */
    .action-buttons .btn,
    .table .btn,
    .form-group .btn,
    .card-footer .btn,
    .modal-footer .btn {
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
    }
    
    /* Ensure icons in buttons are properly aligned */
    .btn i, .btn .fas, .btn .fab, .btn .far {
        vertical-align: middle;
    }
    
    /* Reduce height of status badges */
    .badge, .status-badge {
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
        line-height: 1.1;
        font-size: 0.75rem;
    }
    
    /* Specifically target buttons under status sections */
    .status-actions .btn,
    .status-update .btn,
    .status-controls .btn,
    div:has(> .status-badge) + div .btn,
    div:has(> .badge) + div .btn,
    tr:has(> td > .badge) .btn,
    tr:has(> td > .status-badge) .btn {
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
        line-height: 1.1;
        margin-top: 0.1rem;
        margin-bottom: 0.1rem;
    }
}

/* Print styles remain unchanged - explicitly set normal font sizes for print */
@media print {
    html {
        font-size: 100%; /* Reset to normal for print */
    }
    
    body {
        font-size: 12pt; /* Standard print font size */
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
    h4 { font-size: 14pt; }
    h5 { font-size: 12pt; }
    h6 { font-size: 10pt; }
}
