/**
 * Hours Calculator Styles
 */

/* Main Container Styles */
.hours-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
}

.calculator-description {
    margin-bottom: 20px;
    color: #505050;
}

.hours-calculator {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Tabs Styling */
.calculator-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 5px;
    position: relative;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tab-button:hover {
    color: #4f46e5;
}

.tab-button.active {
    color: #4f46e5;
    font-weight: 600;
}

.tab-button.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4f46e5;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #333;
}

/* Input Rows and Groups */
.time-row, .date-time-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.time-row label, .date-time-row label {
    width: 150px;
    display: inline-block;
    font-weight: 500;
    color: #333;
}

.time-input-group, .datetime-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.time-input, .date-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.time-input {
    width: 80px;
    text-align: center;
}

.date-input {
    width: 150px;
}

/* AM/PM Selector */
.am-pm-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.am-pm-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    width: auto;
    cursor: pointer;
}

.am-pm-selector input[type="radio"] {
    margin: 0;
}

/* Now Button */
.now-btn {
    padding: 6px 10px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9em;
}

.now-btn:hover {
    background-color: #5a6268;
}

/* Swap Button */
.swap-btn-container {
    margin-left: 10px;
}

.swap-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.swap-btn:hover {
    background-color: #e9ecef;
}

.swap-btn svg {
    fill: #6c757d;
}

.swap-btn:hover svg {
    fill: #4f46e5;
}

/* Calculator Buttons */
.calculator-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.calc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

#calculate-times, #calculate-dates {
    background-color: #4f46e5;
    color: white;
}

#calculate-times:hover, #calculate-dates:hover {
    background-color: #4338ca;
}

.reset-btn {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
}

.reset-btn:hover {
    background-color: #e9ecef;
}

/* Results Container */
.result-container {
    background-color: #f0f2f5;
    border-left: 4px solid #4f46e5;
    padding: 15px;
    border-radius: 4px;
}

.result-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
}

.result-box {
    background-color: white;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.result-box p {
    margin: 0;
    color: #333;
}

#times-result-value, #dates-result-value {
    font-weight: bold;
    color: #4f46e5;
}

/* Calculator Info Section */
.calculator-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.calculator-info h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #343a40;
}

.calculator-info h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #495057;
}

.calculator-info p {
    line-height: 1.7;
    color: #6c757d;
    margin-bottom: 15px;
}

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.info-table th, 
.info-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.info-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.info-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .time-row, .date-time-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .time-row label, .date-time-row label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .time-input-group, .datetime-input-group {
        width: 100%;
    }
    
    .swap-btn-container {
        position: absolute;
        right: 0;
        top: 0;
    }
    
    .calculator-buttons {
        flex-direction: column;
    }
    
    .calc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calculator-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
        text-align: center;
    }
    
    .am-pm-selector {
        width: 100%;
        justify-content: flex-start;
        margin-top: 5px;
    }
    
    .time-input, .date-input {
        width: 100%;
    }
} 