/* --- Modern Calculator Styles --- */

/* Define a color palette and base styles */
:root {
    --background-color: #f4f7f9;
    --container-color: #ffffff;
    --primary-color: #3b82f6; /* Blue 600 */
    --primary-text-color: #1f2937; /* Gray 800 */
    --secondary-text-color: #4b5563; /* Gray 600 */
    --light-gray-color: #e5e7eb; /* Gray 200 */
    --border-color: #d1d5db; /* Gray 300 */
    --error-color: #ef4444; /* Red 500 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* General body styles */
body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 20px;
    background: var(--background-color);
    color: var(--primary-text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main application container */
#app-container {
    max-width: 550px;
    margin: 40px auto;
    padding: 32px;
    background: var(--container-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-gray-color);
}

/* Typography */
h1 {
    text-align: center;
    margin-block-start: 0;
    margin-block-end: 8px;
    font-size: 26px;
    font-weight: 600;
}

.subtitle {
    color: var(--secondary-text-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 32px;
    font-size: 16px;
}

/* Form layout and styling */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.date-inputs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px; /* Allow items to grow, shrink, and have a base width */
}

.input-group label {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--primary-text-color);
}

input[type="date"] {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Checkbox options styling */
.options-group {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 16px;
    background-color: #f9fafb; /* Gray 50 */
    border-radius: 8px;
}

.options-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--secondary-text-color);
    cursor: pointer;
}

input[type="checkbox"] {
    width: 1.15em;
    height: 1.15em;
    accent-color: var(--primary-color);
}

/* Result display area */
.result-display {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(145deg, #f9fafb, #f4f7f9);
    border-radius: 10px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--light-gray-color);
}

.result-display .placeholder {
    color: var(--secondary-text-color);
    font-size: 16px;
}

.result-display .error {
    color: var(--error-color);
    font-weight: 500;
    margin: 0;
}

.result-display .result-value {
    font-size: 52px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.result-display .result-label {
    font-size: 16px;
    color: var(--secondary-text-color);
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 500;
}
