/**
 * Roof Repair Calculator - Frontend Styles
 *
 * @package Suspended_Roof_Repair_Calculator
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.roof-calculator {
    /* Colors */
    --rcrc-primary: #f5a623;
    --rcrc-primary-hover: #e69515;
    --rcrc-primary-light: #fff8eb;
    --rcrc-secondary: #3d5a47;
    --rcrc-secondary-hover: #2d4437;
    --rcrc-secondary-light: #e8f0ea;
    
    --rcrc-success: #28a745;
    --rcrc-success-light: #d4edda;
    --rcrc-warning: #f5a623;
    --rcrc-warning-light: #fff3cd;
    --rcrc-danger: #dc3545;
    --rcrc-danger-light: #f8d7da;
    
    /* Text Colors */
    --rcrc-text: #333333;
    --rcrc-text-light: #666666;
    --rcrc-text-muted: #999999;
    
    /* Background */
    --rcrc-bg: #ffffff;
    --rcrc-bg-light: #f8f9fa;
    --rcrc-bg-dark: #f0f0f0;
    
    /* Border */
    --rcrc-border: #e0e0e0;
    --rcrc-border-light: #f0f0f0;
    
    /* Price color */
    --rcrc-price: #2d5a3d;
    
    /* Typography */
    --rcrc-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --rcrc-font-size-xs: 12px;
    --rcrc-font-size-sm: 14px;
    --rcrc-font-size-base: 16px;
    --rcrc-font-size-lg: 18px;
    --rcrc-font-size-xl: 24px;
    --rcrc-font-size-2xl: 32px;
    --rcrc-font-size-3xl: 48px;
    
    /* Spacing */
    --rcrc-spacing-xs: 4px;
    --rcrc-spacing-sm: 8px;
    --rcrc-spacing-md: 16px;
    --rcrc-spacing-lg: 24px;
    --rcrc-spacing-xl: 32px;
    --rcrc-spacing-2xl: 48px;
    
    /* Border Radius */
    --rcrc-radius-sm: 4px;
    --rcrc-radius: 8px;
    --rcrc-radius-lg: 12px;
    --rcrc-radius-xl: 16px;
    
    /* Shadows */
    --rcrc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --rcrc-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --rcrc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --rcrc-transition: 0.2s ease;
    --rcrc-transition-slow: 0.3s ease;
    
    /* Layout */
    --rcrc-max-width: 1200px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

.roof-calculator {
    font-family: var(--rcrc-font);
    font-size: var(--rcrc-font-size-base);
    line-height: 1.5;
    color: var(--rcrc-text);
    background: var(--rcrc-bg);
    border-radius: var(--rcrc-radius-lg);
    box-shadow: var(--rcrc-shadow);
    max-width: var(--rcrc-max-width);
    margin: 0 auto;
    overflow: hidden;
}

.roof-calculator *,
.roof-calculator *::before,
.roof-calculator *::after {
    box-sizing: border-box;
}

.roof-calculator-inner {
    padding: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.rcrc-header {
    padding: var(--rcrc-spacing-lg) var(--rcrc-spacing-xl);
    background: var(--rcrc-bg-light);
    border-bottom: 1px solid var(--rcrc-border-light);
}

.rcrc-title {
    margin: 0;
    font-size: var(--rcrc-font-size-2xl);
    font-weight: 700;
    color: var(--rcrc-text);
    text-align: center;
}

/* ==========================================================================
   Content Layout
   ========================================================================== */

.rcrc-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
}

@media (max-width: 1024px) {
    .rcrc-content {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Inputs Section
   ========================================================================== */

.rcrc-inputs {
    padding: var(--rcrc-spacing-xl);
}

.rcrc-section {
    margin-bottom: var(--rcrc-spacing-xl);
}

.rcrc-section:last-child {
    margin-bottom: 0;
}

.rcrc-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--rcrc-spacing-md);
    margin-bottom: var(--rcrc-spacing-md);
}

.rcrc-label {
    display: block;
    font-size: var(--rcrc-font-size-sm);
    font-weight: 600;
    color: var(--rcrc-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Mode Toggle
   ========================================================================== */

.rcrc-mode-toggle {
    display: flex;
    background: var(--rcrc-bg-light);
    border-radius: var(--rcrc-radius);
    padding: 4px;
    gap: 4px;
}

.rcrc-mode-btn {
    flex: 1;
    padding: var(--rcrc-spacing-sm) var(--rcrc-spacing-md);
    font-size: var(--rcrc-font-size-sm);
    font-weight: 500;
    color: var(--rcrc-text-light);
    background: transparent;
    border: none;
    border-radius: var(--rcrc-radius-sm);
    cursor: pointer;
    transition: var(--rcrc-transition);
}

.rcrc-mode-btn:hover {
    color: var(--rcrc-text);
    background: var(--rcrc-bg);
}

.rcrc-mode-btn.active {
    color: var(--rcrc-text);
    background: var(--rcrc-bg);
    box-shadow: var(--rcrc-shadow-sm);
}

/* ==========================================================================
   Area Inputs
   ========================================================================== */

.rcrc-area-input {
    display: none;
}

.rcrc-area-input.active {
    display: block;
}

/* Slider */
.rcrc-slider-container {
    position: relative;
    padding: var(--rcrc-spacing-lg) 0;
}

.rcrc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--rcrc-bg-light);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.rcrc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--rcrc-primary);
    border: 4px solid var(--rcrc-bg);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--rcrc-shadow);
    transition: var(--rcrc-transition);
}

.rcrc-slider::-webkit-slider-thumb:hover {
    background: var(--rcrc-primary-hover);
    transform: scale(1.1);
}

.rcrc-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--rcrc-primary);
    border: 4px solid var(--rcrc-bg);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--rcrc-shadow);
    transition: var(--rcrc-transition);
}

.rcrc-slider::-moz-range-thumb:hover {
    background: var(--rcrc-primary-hover);
}

.rcrc-slider-value {
    text-align: center;
    margin-top: var(--rcrc-spacing-md);
}

.rcrc-slider-number {
    font-size: var(--rcrc-font-size-3xl);
    font-weight: 700;
    color: var(--rcrc-secondary);
}

.rcrc-slider-unit {
    font-size: var(--rcrc-font-size-lg);
    color: var(--rcrc-text-light);
    margin-left: var(--rcrc-spacing-xs);
}

.rcrc-slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: var(--rcrc-spacing-sm);
    font-size: var(--rcrc-font-size-xs);
    color: var(--rcrc-text-muted);
}

/* Dimensions */
.rcrc-dimensions-grid {
    display: flex;
    align-items: center;
    gap: var(--rcrc-spacing-md);
    flex-wrap: wrap;
}

.rcrc-dimension-field {
    flex: 1;
    min-width: 120px;
}

.rcrc-dimension-field label {
    display: block;
    font-size: var(--rcrc-font-size-xs);
    color: var(--rcrc-text-light);
    margin-bottom: var(--rcrc-spacing-xs);
}

.rcrc-input-group {
    display: flex;
    align-items: center;
    background: var(--rcrc-bg-light);
    border: 2px solid var(--rcrc-border);
    border-radius: var(--rcrc-radius);
    overflow: hidden;
    transition: var(--rcrc-transition);
}

.rcrc-input-group:focus-within {
    border-color: var(--rcrc-primary);
}

.rcrc-input {
    flex: 1;
    padding: var(--rcrc-spacing-sm) var(--rcrc-spacing-md);
    font-size: var(--rcrc-font-size-lg);
    font-weight: 600;
    color: var(--rcrc-text);
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
}

.rcrc-input::-webkit-inner-spin-button,
.rcrc-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rcrc-input[type="number"] {
    -moz-appearance: textfield;
}

.rcrc-input-suffix {
    padding: var(--rcrc-spacing-sm) var(--rcrc-spacing-md);
    font-size: var(--rcrc-font-size-sm);
    color: var(--rcrc-text-muted);
    background: var(--rcrc-bg);
    border-left: 1px solid var(--rcrc-border);
}

.rcrc-dimension-multiply,
.rcrc-dimension-equals {
    font-size: var(--rcrc-font-size-xl);
    font-weight: 600;
    color: var(--rcrc-text-light);
}

.rcrc-dimension-result {
    display: flex;
    align-items: baseline;
    gap: var(--rcrc-spacing-xs);
    padding: var(--rcrc-spacing-md);
    background: var(--rcrc-secondary-light);
    border-radius: var(--rcrc-radius);
}

.rcrc-calculated-area {
    font-size: var(--rcrc-font-size-xl);
    font-weight: 700;
    color: var(--rcrc-secondary);
}

.rcrc-area-unit {
    font-size: var(--rcrc-font-size-sm);
    color: var(--rcrc-secondary);
}

/* ==========================================================================
   Material Select
   ========================================================================== */

.rcrc-select-wrapper {
    position: relative;
}

.rcrc-select {
    width: 100%;
    padding: var(--rcrc-spacing-md);
    padding-right: var(--rcrc-spacing-xl);
    font-size: var(--rcrc-font-size-base);
    font-weight: 500;
    color: var(--rcrc-text);
    background: var(--rcrc-bg-light);
    border: 2px solid var(--rcrc-border);
    border-radius: var(--rcrc-radius);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: var(--rcrc-transition);
}

.rcrc-select:focus {
    outline: none;
    border-color: var(--rcrc-primary);
}

.rcrc-select-arrow {
    position: absolute;
    right: var(--rcrc-spacing-md);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--rcrc-text-muted);
}

/* ==========================================================================
   Complexity Options
   ========================================================================== */

.rcrc-complexity-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--rcrc-spacing-md);
}

@media (max-width: 768px) {
    .rcrc-complexity-options {
        grid-template-columns: 1fr;
    }
}

.rcrc-complexity-option {
    cursor: pointer;
}

.rcrc-complexity-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rcrc-complexity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--rcrc-spacing-sm);
    padding: var(--rcrc-spacing-lg);
    background: var(--rcrc-bg-light);
    border: 2px solid var(--rcrc-border);
    border-radius: var(--rcrc-radius-lg);
    transition: var(--rcrc-transition);
    position: relative;
}

.rcrc-complexity-card:hover {
    border-color: var(--rcrc-primary);
    background: var(--rcrc-primary-light);
}

.rcrc-complexity-option input:checked + .rcrc-complexity-card {
    border-color: var(--rcrc-primary);
    background: var(--rcrc-primary-light);
}

.rcrc-complexity-option input:checked + .rcrc-complexity-card .rcrc-complexity-check {
    opacity: 1;
}

.rcrc-complexity-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
}

.rcrc-complexity-icon svg {
    width: 28px;
    height: 28px;
}

.rcrc-complexity-simple { background: var(--rcrc-success); }
.rcrc-complexity-moderate { background: var(--rcrc-warning); }
.rcrc-complexity-complex { background: var(--rcrc-danger); }

.rcrc-complexity-info {
    text-align: center;
}

.rcrc-complexity-name {
    display: block;
    font-size: var(--rcrc-font-size-base);
    font-weight: 600;
    color: var(--rcrc-text);
}

.rcrc-complexity-desc {
    display: block;
    font-size: var(--rcrc-font-size-xs);
    color: var(--rcrc-text-light);
    margin-top: 2px;
}

.rcrc-complexity-check {
    position: absolute;
    top: var(--rcrc-spacing-sm);
    right: var(--rcrc-spacing-sm);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rcrc-primary);
    border-radius: 50%;
    color: #fff;
    opacity: 0;
    transition: var(--rcrc-transition);
}

/* ==========================================================================
   Results Section
   ========================================================================== */

.rcrc-results {
    background: var(--rcrc-secondary);
    padding: var(--rcrc-spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .rcrc-results {
        padding: var(--rcrc-spacing-lg);
    }
}

.rcrc-result-card {
    width: 100%;
    background: var(--rcrc-bg);
    border-radius: var(--rcrc-radius-lg);
    overflow: hidden;
    box-shadow: var(--rcrc-shadow-lg);
}

.rcrc-result-header {
    padding: var(--rcrc-spacing-md) var(--rcrc-spacing-lg);
    background: var(--rcrc-bg-light);
    border-bottom: 1px solid var(--rcrc-border-light);
}

.rcrc-result-label {
    font-size: var(--rcrc-font-size-sm);
    font-weight: 600;
    color: var(--rcrc-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rcrc-result-body {
    padding: var(--rcrc-spacing-lg);
}

/* Total Price */
.rcrc-total-price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    margin-bottom: var(--rcrc-spacing-md);
}

.rcrc-currency {
    font-size: var(--rcrc-font-size-xl);
    font-weight: 600;
    color: var(--rcrc-price);
    line-height: 1;
    padding-top: 8px;
}

.rcrc-amount {
    font-size: 56px;
    font-weight: 700;
    color: var(--rcrc-price);
    line-height: 1;
}

/* Discount Label */
.rcrc-discount-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rcrc-spacing-sm);
    padding: var(--rcrc-spacing-sm) var(--rcrc-spacing-md);
    background: var(--rcrc-danger-light);
    border-radius: var(--rcrc-radius);
    margin-bottom: var(--rcrc-spacing-md);
}

.rcrc-discount-text {
    font-size: var(--rcrc-font-size-sm);
    font-weight: 500;
    color: var(--rcrc-danger);
}

.rcrc-discount-percent {
    font-size: var(--rcrc-font-size-sm);
    font-weight: 700;
    color: var(--rcrc-danger);
}

/* Breakdown */
.rcrc-breakdown {
    border-top: 1px solid var(--rcrc-border-light);
    padding-top: var(--rcrc-spacing-md);
    margin-bottom: var(--rcrc-spacing-md);
}

.rcrc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--rcrc-spacing-xs) 0;
}

.rcrc-breakdown-label {
    font-size: var(--rcrc-font-size-sm);
    color: var(--rcrc-text-light);
}

.rcrc-breakdown-value {
    font-size: var(--rcrc-font-size-sm);
    font-weight: 600;
    color: var(--rcrc-text);
}

.rcrc-breakdown-discount .rcrc-breakdown-value {
    color: var(--rcrc-danger);
}

/* Area Summary */
.rcrc-area-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--rcrc-spacing-sm);
    padding: var(--rcrc-spacing-sm);
    background: var(--rcrc-bg-light);
    border-radius: var(--rcrc-radius);
    font-size: var(--rcrc-font-size-xs);
    color: var(--rcrc-text-light);
}

.rcrc-summary-separator {
    color: var(--rcrc-border);
}

/* ==========================================================================
   Result Footer / Buttons
   ========================================================================== */

.rcrc-result-footer {
    padding: var(--rcrc-spacing-lg);
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: var(--rcrc-spacing-sm);
}

.rcrc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rcrc-spacing-sm);
    padding: var(--rcrc-spacing-md) var(--rcrc-spacing-lg);
    font-size: var(--rcrc-font-size-base);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--rcrc-radius);
    cursor: pointer;
    transition: var(--rcrc-transition);
}

.rcrc-btn-primary {
    background: var(--rcrc-primary);
    color: #fff;
}

.rcrc-btn-primary:hover {
    background: var(--rcrc-primary-hover);
}

.rcrc-btn-secondary {
    background: var(--rcrc-bg-light);
    color: var(--rcrc-text);
    border: 2px solid var(--rcrc-border);
}

.rcrc-btn-secondary:hover {
    background: var(--rcrc-bg-dark);
    border-color: var(--rcrc-text-muted);
}

.rcrc-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.rcrc-loading .rcrc-amount {
    opacity: 0.5;
}

.rcrc-loading .rcrc-breakdown-value {
    opacity: 0.5;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .rcrc-title {
        font-size: var(--rcrc-font-size-xl);
    }
    
    .rcrc-slider-number {
        font-size: var(--rcrc-font-size-2xl);
    }
    
    .rcrc-amount {
        font-size: 48px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .rcrc-header {
        padding: var(--rcrc-spacing-md);
    }
    
    .rcrc-inputs {
        padding: var(--rcrc-spacing-md);
    }
    
    .rcrc-section-header {
        gap: var(--rcrc-spacing-sm);
    }
    
    .rcrc-mode-toggle {
        flex-direction: column;
    }
    
    .rcrc-mode-btn {
        width: 100%;
    }
    
    .rcrc-dimensions-grid {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rcrc-dimension-multiply,
    .rcrc-dimension-equals {
        text-align: center;
        padding: var(--rcrc-spacing-xs) 0;
    }
    
    .rcrc-dimension-result {
        justify-content: center;
    }
    
    .rcrc-complexity-options {
        gap: var(--rcrc-spacing-sm);
    }
    
    .rcrc-complexity-card {
        flex-direction: row;
        padding: var(--rcrc-spacing-md);
        gap: var(--rcrc-spacing-md);
    }
    
    .rcrc-complexity-icon {
        width: 48px;
        height: 48px;
    }
    
    .rcrc-complexity-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .rcrc-complexity-info {
        text-align: left;
        flex: 1;
    }
    
    .rcrc-results {
        padding: var(--rcrc-spacing-md);
    }
    
    .rcrc-amount {
        font-size: 40px;
    }
    
    .rcrc-currency {
        font-size: var(--rcrc-font-size-lg);
        padding-top: 6px;
    }
    
    .rcrc-area-summary {
        font-size: 11px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .rcrc-title {
        font-size: var(--rcrc-font-size-lg);
    }
    
    .rcrc-slider-number {
        font-size: var(--rcrc-font-size-xl);
    }
    
    .rcrc-amount {
        font-size: 32px;
    }
    
    .rcrc-currency {
        font-size: var(--rcrc-font-size-base);
        padding-top: 4px;
    }
}

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes rcrc-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.rcrc-calculating .rcrc-amount {
    animation: rcrc-pulse 1s ease-in-out infinite;
}

/* ==========================================================================
   Popup Form
   ========================================================================== */

.rcrc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: var(--rcrc-spacing-md);
    animation: rcrc-fadeIn 0.2s ease;
}

@keyframes rcrc-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rcrc-popup {
    background: var(--rcrc-bg);
    border-radius: var(--rcrc-radius-lg);
    box-shadow: var(--rcrc-shadow-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: rcrc-slideUp 0.3s ease;
}

@keyframes rcrc-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rcrc-popup-close {
    position: absolute;
    top: var(--rcrc-spacing-md);
    right: var(--rcrc-spacing-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rcrc-bg-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--rcrc-text-light);
    transition: var(--rcrc-transition);
    z-index: 1;
}

.rcrc-popup-close:hover {
    background: var(--rcrc-bg-dark);
    color: var(--rcrc-text);
}

.rcrc-popup-content {
    padding: var(--rcrc-spacing-xl);
}

.rcrc-popup-header {
    text-align: center;
    margin-bottom: var(--rcrc-spacing-lg);
    padding-right: var(--rcrc-spacing-xl);
}

.rcrc-popup-title {
    margin: 0 0 var(--rcrc-spacing-sm);
    font-size: var(--rcrc-font-size-xl);
    font-weight: 700;
    color: var(--rcrc-text);
}

.rcrc-popup-description {
    margin: 0;
    font-size: var(--rcrc-font-size-sm);
    color: var(--rcrc-text-light);
}

.rcrc-popup-form {
    display: flex;
    flex-direction: column;
    gap: var(--rcrc-spacing-md);
}

.rcrc-popup-field {
    display: flex;
    flex-direction: column;
    gap: var(--rcrc-spacing-xs);
}

.rcrc-popup-field label {
    font-size: var(--rcrc-font-size-sm);
    font-weight: 600;
    color: var(--rcrc-text);
}

.rcrc-required {
    color: var(--rcrc-danger);
}

.rcrc-popup-input,
.rcrc-popup-textarea {
    padding: var(--rcrc-spacing-sm) var(--rcrc-spacing-md);
    font-size: var(--rcrc-font-size-base);
    color: var(--rcrc-text);
    background: var(--rcrc-bg-light);
    border: 2px solid var(--rcrc-border);
    border-radius: var(--rcrc-radius);
    transition: var(--rcrc-transition);
    width: 100%;
    font-family: inherit;
}

.rcrc-popup-input:focus,
.rcrc-popup-textarea:focus {
    outline: none;
    border-color: var(--rcrc-primary);
}

.rcrc-popup-textarea {
    resize: vertical;
    min-height: 80px;
}

.rcrc-popup-calculation {
    background: var(--rcrc-secondary-light);
    border-radius: var(--rcrc-radius);
    padding: var(--rcrc-spacing-md);
    text-align: center;
}

.rcrc-popup-calc-label {
    font-size: var(--rcrc-font-size-xs);
    font-weight: 600;
    color: var(--rcrc-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--rcrc-spacing-xs);
}

.rcrc-popup-calc-total {
    font-size: var(--rcrc-font-size-2xl);
    font-weight: 700;
    color: var(--rcrc-secondary);
}

.rcrc-popup-calc-details {
    font-size: var(--rcrc-font-size-xs);
    color: var(--rcrc-text-light);
    margin-top: var(--rcrc-spacing-xs);
}

.rcrc-popup-submit {
    margin-top: var(--rcrc-spacing-sm);
}

.rcrc-popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Popup Success State */
.rcrc-popup-success {
    text-align: center;
    padding: var(--rcrc-spacing-lg) 0;
}

.rcrc-popup-success-icon {
    color: var(--rcrc-success);
    margin-bottom: var(--rcrc-spacing-md);
}

.rcrc-popup-success-icon svg {
    width: 64px;
    height: 64px;
}

.rcrc-popup-success-title {
    margin: 0 0 var(--rcrc-spacing-sm);
    font-size: var(--rcrc-font-size-xl);
    font-weight: 700;
    color: var(--rcrc-text);
}

.rcrc-popup-success-message {
    margin: 0 0 var(--rcrc-spacing-lg);
    font-size: var(--rcrc-font-size-base);
    color: var(--rcrc-text-light);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .roof-calculator {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .rcrc-btn {
        display: none;
    }
    
    .rcrc-results {
        background: #f5f5f5;
    }
    
    .rcrc-popup-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   Small Spinner (for buttons)
   ========================================================================== */

.rcrc-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rcrc-spin 0.75s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes rcrc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

.roof-calculator.rtl {
    direction: rtl;
    text-align: right;
}

.roof-calculator.rtl .rcrc-input-group {
    flex-direction: row-reverse;
}

.roof-calculator.rtl .rcrc-input-suffix {
    border-radius: var(--rcrc-radius-sm) 0 0 var(--rcrc-radius-sm);
}

.roof-calculator.rtl .rcrc-input-group .rcrc-input {
    border-radius: 0 var(--rcrc-radius-sm) var(--rcrc-radius-sm) 0;
}

.roof-calculator.rtl .rcrc-select-arrow {
    right: auto;
    left: 12px;
}

.roof-calculator.rtl .rcrc-select {
    padding-right: 16px;
    padding-left: 36px;
}

.roof-calculator.rtl .rcrc-breakdown-row {
    flex-direction: row-reverse;
}

.roof-calculator.rtl .rcrc-result-footer {
    flex-direction: row-reverse;
}

.roof-calculator.rtl .rcrc-dimension-fields {
    flex-direction: row-reverse;
}

.roof-calculator.rtl .rcrc-complexity-option .rcrc-complexity-card {
    flex-direction: row-reverse;
}

.roof-calculator.rtl .rcrc-complexity-check {
    right: auto;
    left: 12px;
}

.roof-calculator.rtl .rcrc-popup-close {
    right: auto;
    left: 16px;
}

.roof-calculator.rtl .rcrc-spinner-small {
    margin-right: 0;
    margin-left: 6px;
}
