/**
 * Fixed Cost Calculator Styles
 * Clean, modular CSS for the Fixed Cost Calculator template
 */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Main Container */
.fixed-cost-container {
    min-height: 100vh;
    background-color: #f9fafb;
    padding: 2rem 1rem;
}

.fixed-cost-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.fixed-cost-header {
    margin-bottom: 2rem;
    text-align: center;
}

.fixed-cost-header h1 {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.fixed-cost-header p {
    color: #6b7280;
    margin: 0;
}

/* Cards */
.fixed-cost-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.fixed-cost-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.fixed-cost-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Headers */
.fixed-cost-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.fixed-cost-icon {
    width: 40px;
    height: 40px;
    background-color: #dbeafe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2563eb;
}

.fixed-cost-card-title {
    flex: 1;
}

.fixed-cost-card-title h2 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin: 0 0 4px 0;
}

.fixed-cost-card-title p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Card 1: Fixed Costs Grid */
.fixed-costs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.fixed-cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.fixed-cost-item:hover {
    background-color: #f9fafb;
}

.fixed-cost-item label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.fixed-cost-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fixed-cost-currency {
    font-size: 0.875rem;
    color: #6b7280;
}

.fixed-cost-input {
    width: 112px;
    padding: 8px 12px;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: right;
    font-family: 'Courier New', monospace;
    background-color: white;
    transition: all 0.2s ease;
}

.fixed-cost-input:hover {
    border-color: #9ca3af;
}

.fixed-cost-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fixed-cost-input.changed {
    background-color: #fefce8;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2);
}

/* Card 2: Employee Info Box */
.employee-info-box {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.employee-info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.employee-info-box strong {
    color: #1e40af;
}

/* Employee Table */
.employee-table-container {
    overflow-x: auto;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    line-height: 1.5;
}

.employee-table thead {
    background-color: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.employee-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.employee-table tbody {
    background-color: white;
}

.employee-table tr {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.employee-table tr:hover {
    background-color: #f9fafb;
}

.employee-table tr.changed {
    background-color: #fefce8;
    border-left: 4px solid #facc15;
}

.employee-table tr.employee-row-hidden {
    display: none;
}

.employee-table td {
    padding: 12px 16px;
    vertical-align: top;
}

.employee-id {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    width: 64px;
}

.employee-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    transition: all 0.2s ease;
}

.employee-input:hover {
    border-color: #9ca3af;
}

.employee-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.employee-input.changed {
    background-color: #fefce8;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2);
}

.employee-input.numeric {
    text-align: right;
    font-family: 'Courier New', monospace;
    width: 128px;
}

/* Add Employee Button */
.add-employee-container {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.add-employee-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2563eb;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-employee-button:hover {
    background-color: #dbeafe;
}

/* Card 3: Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.summary-left, .summary-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.working-days-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.working-days-container label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.working-days-input {
    width: 80px;
    padding: 8px 12px;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-family: 'Courier New', monospace;
    background-color: white;
    transition: all 0.2s ease;
}

.working-days-input:hover {
    border-color: #9ca3af;
}

.working-days-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.working-days-input.changed {
    background-color: #fefce8;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2);
}

/* Display Boxes */
.display-box {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid;
}

.display-box.blue {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.display-box.green {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.display-box.purple {
    background-color: #faf5ff;
    border-color: #d8b4fe;
}

.display-box-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.display-box-value {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.display-box.blue .display-box-value {
    color: #1e40af;
}

.display-box.green .display-box-value {
    color: #166534;
}

.display-box.purple .display-box-value {
    color: #7c3aed;
}

/* Update Button */
.fixed-cost-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.fixed-cost-update-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #2563eb;
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.fixed-cost-update-button:hover {
    background-color: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.fixed-cost-update-button:active {
    transform: translateY(0);
}

.fixed-cost-change-badge {
    background-color: #facc15;
    color: #1f2937;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
    display: none;
}

/* Legend */
.fixed-cost-legend {
    background-color: #fefce8;
    border: 1px solid #facc15;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    display: none;
}

.fixed-cost-legend.show {
    display: block;
}

.fixed-cost-legend p {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
}

.fixed-cost-legend-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #facc15;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Success/Error Messages */
.update-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 500;
}

.update-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fixed-cost-container {
        padding: 1rem 0.5rem;
    }
    
    .fixed-costs-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-table-container {
        overflow-x: scroll;
    }
    
    .fixed-cost-header h1 {
        font-size: 1.5rem;
    }
}
