/**
 * Rytner Calculator Frontend Styles
 */

/* Calculator Container */
.rytner-paint-calculator,
.rytner-tiles-calculator {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rytner-paint-calculator h3,
.rytner-tiles-calculator h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.rytner-paint-calculator p,
.rytner-tiles-calculator p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

/* Form Styles */
.rytner-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.form-group input::placeholder {
    color: #999;
}

.form-group small {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Calculate Button */
.rytner-calculate-btn {
    background: #0073aa;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.rytner-calculate-btn:hover {
    background: #005a87;
}

.rytner-calculate-btn:active {
    transform: translateY(1px);
}

/* Results Section */
.rytner-results {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rytner-results h4 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 600;
    color: #333;
}

.result-item .value {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
}

.calculation-note {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    font-size: 14px;
}

.calculation-note p {
    margin: 0;
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rytner-paint-calculator,
    .rytner-tiles-calculator {
        margin: 10px;
        padding: 15px;
    }
    
    .rytner-paint-calculator h3,
    .rytner-tiles-calculator h3 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }
    
    .rytner-calculate-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-item .value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .rytner-paint-calculator,
    .rytner-tiles-calculator {
        margin: 5px;
        padding: 12px;
    }
    
    .rytner-results {
        padding: 15px;
    }
    
    .calculation-note {
        padding: 10px;
    }
}

/* Loading State */
.rytner-calculator-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rytner-calculate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Animation for results */
.rytner-results {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error States */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Success States */
.form-group input.success,
.form-group select.success {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
} 