/* Working Day Counter - Styles */

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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Results Section */
.results-section {
    background: var(--card-background);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.result-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-card.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.result-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.result-sublabel {
    font-size: 0.9rem;
    opacity: 0.9;
}

.date-range-display {
    text-align: center;
    padding: 16px;
    background: var(--background);
    border-radius: 8px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.date-range-display .arrow {
    margin: 0 12px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Holidays Section */
.holidays-section {
    margin-top: 24px;
}

.holidays-section h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.holiday-name {
    font-weight: 600;
    color: var(--text-primary);
}

.holiday-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Input Section */
.input-section {
    background: var(--card-background);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.region-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-background);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.region-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Toggle Section */
.toggle-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--background);
    border-radius: 8px;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.toggle-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.toggle-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Date Section */
.date-section {
    margin-bottom: 32px;
}

.date-section h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Month Grid */
.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.month-btn {
    padding: 12px;
    border: 2px solid var(--border-color);
    background: var(--card-background);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.month-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.month-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    border-left: 4px solid var(--error-color);
}

.error-message.show {
    display: block;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .results-section,
    .input-section {
        padding: 20px;
    }

    .result-number {
        font-size: 2.5rem;
    }

    .date-inputs {
        grid-template-columns: 1fr;
    }

    .month-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .results-section,
    .input-section {
        padding: 16px;
    }

    .month-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-number {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .input-section,
    .btn {
        display: none;
    }

    .results-section {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
