/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-gray: #f5f6fa;
    --dark-gray: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

h2 {
    text-align: center;
    color: var(--dark-gray);
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Form Styles */
.input-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#addPromotion {
    background-color: var(--dark-gray);
    margin-top: 10px;
}

#addPromotion:hover {
    background-color: #6c7a7d;
}

/* Results Section */
#results {
    margin-top: 30px;
}

.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.result-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-section {
    background-color: #f8f9fa;
    border-left: 4px solid #4a6fdc;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.result-section h4 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.result-section p {
    margin: 8px 0;
    line-height: 1.5;
}

.result-section strong {
    color: #2c3e50;
}

/* Ineligible Notice Styling */
.ineligible-notice {
    background-color: #fff8f8;
    border-left: 4px solid #e74c3c;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.ineligible-notice p {
    margin: 8px 0;
    color: #7f8c8d;
}

.ineligible-notice p:first-child {
    color: #e74c3c;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-section {
        padding: 10px;
    }
}

.result-box h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Chart Styles */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 20px 0;
    height: 400px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--light-gray);
    font-weight: 600;
}

tr:hover {
    background-color: #f5f5f5;
}

/* Promotion Entry */
.promotion-entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.remove-promotion {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-promotion:hover {
    background: #c0392b;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .promotion-entry {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    
    .promotion-entry button {
        grid-column: 1 / -1;
    }
    
    .container {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .input-section, button {
        display: none;
    }
    
    #results {
        display: block !important;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
    }
}
