/**
 * Snow Quote Calculator Styles - Light Theme
 * Red accents, light greys, white, and occasional blue
 * Compatible with Kadence themes
 */

/* Main Container */
.snow-quote-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.sqc-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

/* Typography */
.sqc-title {
    color: #333333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #dc3545;
    padding-bottom: 15px;
}

.sqc-section-title {
    color: #333333;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    margin-top: 30px;
    padding-left: 10px;
    border-left: 4px solid #dc3545;
}

.sqc-section:first-child .sqc-section-title {
    margin-top: 0;
}

/* Form Sections */
.sqc-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

/* Kadence Grid Compatibility */
.kadence-blocks-row-layout {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.kadence-column {
    padding: 10px;
    flex: 1;
    min-width: 0;
}

.kadence-column-33-33-33 {
    flex: 0 0 33.333%;
}

.kadence-column-25-25-25-25 {
    flex: 0 0 25%;
}

.kadence-column-50-50 {
    flex: 0 0 50%;
}

/* Form Fields */
.sqc-field {
    margin-bottom: 20px;
}

.sqc-field label {
    display: block;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
    font-size: 14px;
}

.sqc-field label .required {
    color: #dc3545;
    font-weight: bold;
}

.sqc-field input,
.sqc-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    color: #333333;
}

.sqc-field input:focus,
.sqc-field select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.sqc-field input:invalid {
    border-color: #dc3545;
}

.sqc-field input::placeholder {
    color: #999999;
}

/* Checkbox and Radio Groups */
.sqc-checkbox-group,
.sqc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sqc-service-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.sqc-checkbox-group label,
.sqc-radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    color: #333333;
}

.sqc-checkbox-group label:hover,
.sqc-radio-group label:hover {
    background: #f0f0f0;
    border-color: #dc3545;
}

.sqc-checkbox-group input,
.sqc-radio-group input {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
    accent-color: #dc3545;
}

/* Error Messages */
.sqc-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

/* Buttons */
.sqc-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.sqc-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.sqc-btn-primary {
    background: #dc3545;
    color: #ffffff;
}

.sqc-btn-primary:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.sqc-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.sqc-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.sqc-btn-blue {
    background: #007bff;
    color: #ffffff;
}

.sqc-btn-blue:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.sqc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Section */
.sqc-results {
    background: #ffffff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.sqc-results-title {
    color: #dc3545;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.sqc-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.sqc-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #e0e0e0;
    color: #333333;
}

.sqc-breakdown-item.sqc-total {
    background: #dc3545;
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
    border-left-color: #c82333;
}

.sqc-breakdown-item.sqc-monthly {
    background: #007bff;
    color: #ffffff;
    font-weight: 500;
    border-left-color: #0056b3;
}

.sqc-breakdown-item .label {
    font-weight: 500;
}

.sqc-breakdown-item .value {
    font-weight: 600;
    font-size: 16px;
}

/* Loading Indicator */
.sqc-loading {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.sqc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #dc3545;
    border-radius: 50%;
    animation: sqc-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes sqc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sqc-loading p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* PDF Button Specific Styling */
.pdf-btn {
    background: #dc3545;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.pdf-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Calculate Button Specific Styling */
.calculate-btn {
    background: #dc3545;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 200px;
}

.calculate-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Reset Button Specific Styling */
.reset-btn {
    background: #6c757d;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sqc-container {
        padding: 20px;
        margin: 10px;
    }
    
    .sqc-title {
        font-size: 24px;
    }
    
    .kadence-blocks-row-layout {
        flex-direction: column;
    }
    
    .kadence-column-33-33-33,
    .kadence-column-25-25-25-25,
    .kadence-column-50-50 {
        flex: 1 1 100%;
    }
    
    .sqc-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .sqc-btn,
    .pdf-btn,
    .calculate-btn,
    .reset-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .sqc-service-types {
        grid-template-columns: 1fr;
    }
    
    .sqc-breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .sqc-breakdown-item .value {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .snow-quote-calculator {
        padding: 10px;
    }
    
    .sqc-container {
        padding: 15px;
    }
    
    .sqc-title {
        font-size: 20px;
    }
    
    .sqc-section {
        padding: 15px;
    }
    
    .sqc-section-title {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .sqc-actions {
        display: none;
    }
    
    .snow-quote-calculator {
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    .sqc-container {
        box-shadow: none;
        border: none;
    }
}

/* Accessibility */
.sqc-field input:focus,
.sqc-field select:focus,
.sqc-btn:focus,
.pdf-btn:focus,
.calculate-btn:focus,
.reset-btn:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sqc-container {
        border: 2px solid #000;
    }
    
    .sqc-field input,
    .sqc-field select {
        border: 2px solid #000;
    }
    
    .sqc-btn-primary,
    .calculate-btn,
    .pdf-btn {
        background: #000;
        color: #fff;
    }
    
    .sqc-btn-secondary,
    .reset-btn {
        background: #666;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sqc-btn,
    .pdf-btn,
    .calculate-btn,
    .reset-btn,
    .sqc-field input,
    .sqc-field select,
    .sqc-checkbox-group label,
    .sqc-radio-group label {
        transition: none;
    }
    
    .sqc-spinner {
        animation: none;
    }
    
    .sqc-results {
        scroll-behavior: auto;
    }
}

/* Error message styling */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success message styling */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

/* Quote results animation */
.quote-results {
    display: none;
}

.quote-results.show {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form validation styles */
.sqc-field.has-error input,
.sqc-field.has-error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.sqc-field.has-error .sqc-error {
    display: block;
}

/* Tooltip styles */
.sqc-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #007bff;
    margin-left: 5px;
}

.sqc-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333333;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sqc-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333333;
    z-index: 1000;
}
