/* tipping_fee_log_styles.css (Final Print Fix) */

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; padding: 0; 
    background-color: #f4f4f9; 
}
header { 
    background-color: #3f51b5;
    color: white; 
    padding: 20px 0; 
    text-align: center; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
header h1 { 
    margin: 0; 
    font-size: 1.8em; 
}
.main-container { 
    max-width: 90%; 
    margin: 30px auto; 
    padding: 20px; 
    background-color: white; 
    border-radius: 8px; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* --- Input Form Styling --- */
.form-section { text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { 
    display: block; 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: #333; 
}
input[type="file"], select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    font-size: 1em;
    margin-bottom: 15px;
}
button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}
button:hover { background-color: #0056b3; }
.warning-label { 
    font-weight: bold; 
    font-size: 1.1em; 
    color: #dc3545;
    display: block;
    margin-top: 10px;
}

/* --- Report Table Styling --- */
.report-section h2 { 
    text-align: center; 
    color: #3f51b5; 
    margin-bottom: 20px; 
}
.table-container { 
    overflow-x: auto; 
    margin-top: 20px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
}
table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.85em;
}
th, td { 
    padding: 8px 12px; 
    border-right: 1px solid #ddd;
}
th:last-child, td:last-child { 
    border-right: none; 
}
th { 
    background-color: #f8f9fa;
    font-weight: bold; 
    text-align: center;
    border-bottom: 2px solid #3f51b5;
}
td { 
    text-align: right; 
    border-bottom: 1px solid #eee; 
}
tr:nth-child(even) { background-color: #fcfcfc; }
tr:hover { background-color: #f1f1f1; }

/* Specific header colors from C# code - using CSS classes */
.color-lavender { background-color: #e6e6fa !important; }
.color-white { background-color: #fff !important; }
.color-yellow { background-color: #fffacd !important; }
.color-azure { background-color: #f0ffff !important; }
.color-chartreuse { background-color: #7fff0033 !important; }

.total-row td { 
    font-weight: bold; 
    border-top: 2px solid #333; 
    border-bottom: 2px solid #333;
}
.action-bar { 
    text-align: center; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #ddd; 
}
.action-bar a, .action-bar button { margin: 0 10px; }
.instructions { 
    background-color: #eee; 
    padding: 15px; 
    border-radius: 4px; 
    margin-top: 20px; 
    text-align: left;
    white-space: pre-wrap;
    font-size: 0.9em;
    color: #555;
    border: 1px solid #ccc;
}

/* --- Final Print Styles Fix --- */
@media print {
    body { 
        padding: 0; 
        margin: 0; 
        font-size: 8pt; /* Aggressively reduced font size */
    }
    header, .action-bar, .instructions, .exit-link { 
        display: none !important;
    }
    .main-container { 
        box-shadow: none; 
        margin: 0; 
        padding: 0; 
        max-width: 100%;
        width: 100%;
    }
    .table-container { 
        overflow: visible; 
        border: none; 
        /* Ensure no horizontal padding/margin is cutting off the table */
        margin: 0 !important;
        padding: 0 !important;
    }
    table { 
        width: 100%; 
        /* Using table-layout: fixed can help, but requires column widths to be set */
    }
    th, td { 
        border: 1px solid #000;
        padding: 2px 4px; /* Reduced cell padding */
    }
    th:last-child, td:last-child { 
        border-right: 1px solid #000; /* Ensure last column has border */
    }
}