/**
 * Dog Veterinary Care Budget Calculator Styles
 * 
 * @package DogVetCalc
 */

/* Reset and Base Styles */
.dvc-calculator * {
    box-sizing: border-box;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Section Titles */
.dvc-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #495057;
}

/* Help Text */
.dvc-help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Required Field Indicator */
.required {
    color: #dc3545;
    font-weight: bold;
}

/* Hide schema.org microdata elements from display */
[itemprop="applicationCategory"],
[itemprop="operatingSystem"],
[itemprop="offers"] {
    display: none !important;
}

/* Print PDF Section */
.dvc-print-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dvc-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.dvc-print-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.dvc-print-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.dvc-print-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.dvc-print-icon {
    flex-shrink: 0;
}

.dvc-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dvc-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Styles */
.dvc-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.dvc-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dvc-subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Input Section */
.dvc-input-section {
    padding: 40px 30px;
    background: #f8f9fa;
}

.dvc-calculator-form {
    margin: 0;
}

.dvc-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    align-items: start;
    border: none;
    padding: 0;
    margin: 0;
}

.dvc-input-grid legend {
    display: none;
}

.dvc-input-group {
    display: flex;
    flex-direction: column;
}

.dvc-input-group.dvc-full-width {
    grid-column: 1 / -1;
}

.dvc-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.95rem;
}

.dvc-select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dvc-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dvc-select:hover {
    border-color: #ced4da;
}

/* Radio Group Styles */
.dvc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dvc-radio-label {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.dvc-radio-label:hover {
    border-color: #ced4da;
    background: #f8f9fa;
}

.dvc-radio-label input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.dvc-radio-label input[type="radio"]:checked + .dvc-radio-text {
    color: #667eea;
}

.dvc-radio-label:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f2ff;
}

.dvc-radio-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dvc-radio-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.dvc-radio-text small {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Results Section */
.dvc-results-section {
    padding: 40px 30px;
    background: white;
}

.dvc-result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.dvc-result-card.dvc-primary-result {
    background: linear-gradient(135deg, #f0f2ff 0%, #e8f0ff 100%);
    border-left-color: #667eea;
}

.dvc-result-card.dvc-primary-result .dvc-result-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.dvc-result-card.dvc-primary-result .dvc-cost-amount {
    font-size: 2rem;
}

.dvc-result-card.dvc-primary-result .dvc-cost-period {
    font-size: 0.9rem;
}

.dvc-result-card.dvc-savings-card {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-left-color: #28a745;
}

.dvc-result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #495057;
}

.dvc-result-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #495057;
}

.dvc-cost-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}

.dvc-cost-display.dvc-smaller {
    margin-bottom: 15px;
}

.dvc-cost-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.dvc-cost-display.dvc-smaller .dvc-cost-amount {
    font-size: 2rem;
}

.dvc-cost-period {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
}

.dvc-cost-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.dvc-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dvc-breakdown-label {
    font-weight: 500;
    color: #495057;
}

.dvc-breakdown-cost {
    font-weight: 600;
    color: #667eea;
}

.dvc-explanation {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Chart Container */
.dvc-chart-container {
    margin-top: 20px;
    position: relative;
    height: 300px;
}

/* Disclaimer */
.dvc-disclaimer {
    padding: 30px;
    background: #fff3cd;
    border-top: 1px solid #ffeaa7;
}

.dvc-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dvc-calculator {
        padding: 15px;
    }
    
    .dvc-header {
        padding: 30px 20px;
    }
    
    .dvc-title {
        font-size: 2rem;
    }
    
    .dvc-input-section,
    .dvc-results-section {
        padding: 30px 20px;
    }
    
    .dvc-input-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dvc-radio-group {
        gap: 10px;
    }
    
    .dvc-radio-label {
        padding: 12px;
    }
    
    .dvc-cost-amount {
        font-size: 2rem;
    }
    
    .dvc-cost-display.dvc-smaller .dvc-cost-amount {
        font-size: 1.5rem;
    }
    
    .dvc-result-card.dvc-primary-result .dvc-cost-amount {
        font-size: 1.75rem;
    }
    
    .dvc-result-card.dvc-primary-result .dvc-result-title {
        font-size: 1.1rem;
    }
    
    .dvc-cost-breakdown {
        grid-template-columns: 1fr;
    }
    
    .dvc-chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .dvc-title {
        font-size: 1.75rem;
    }
    
    .dvc-subtitle {
        font-size: 1rem;
    }
    
    .dvc-cost-amount {
        font-size: 1.75rem;
    }
    
    .dvc-cost-display.dvc-smaller .dvc-cost-amount {
        font-size: 1.25rem;
    }
    
    .dvc-result-card.dvc-primary-result .dvc-cost-amount {
        font-size: 1.5rem;
    }
    
    .dvc-result-card.dvc-primary-result .dvc-result-title {
        font-size: 1rem;
    }
    
    .dvc-print-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .dvc-print-icon {
        width: 18px;
        height: 18px;
    }
}

/* Loading States */
.dvc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dvc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: dvc-spin 1s linear infinite;
}

@keyframes dvc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.dvc-calculator *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.dvc-calculator button:focus,
.dvc-calculator select:focus,
.dvc-calculator input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .dvc-calculator {
        box-shadow: none;
        max-width: none;
        padding: 0;
    }
    
    .dvc-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .dvc-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .dvc-input-section {
        display: none;
    }
    
    .dvc-chart-container {
        display: none;
    }
}
