/* BEM CSS for GeoEnergia Calculator */

/* Global Color Variables */
:root {
    --color-primary: #37A58C;
    --color-primary-light: #73C0AE;
    --color-primary-disabled: #D7EDE8;
    --color-secondary: #DD0060;
    --color-secondary-light: #ffeff8;
    --color-black: #000000;
    --color-off-black: #242424;
}

/* Calculator Main Container */
.calculator {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.calculator__header {
    background: var(--color-primary);
    color: white;
    padding: 32px;
    text-align: center;
}

.calculator__title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
}

.calculator__subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Radio Options - Enhanced for large cards */
.radio-options {
    display: flex;
    gap: 16px;
}

.radio-options--large {
    display: grid;
    gap: 16px;
}

.radio-options--horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.radio-options__item {
    flex: 1;
    position: relative;
}

.radio-options__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-options__label {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    height: 100%;
    color: var(--color-off-black);
}

/* Large radio options styling */
.radio-options--large .radio-options__label {
    padding: 24px;
    text-align: left;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    height: auto;
    display: flex;
    flex-direction: column;
}

.radio-options--large .radio-options__label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.radio-options__label:hover {
    border-color: var(--color-primary);
}

.radio-options--large .radio-options__label:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.radio-options__input:checked + .radio-options__label {
    border-color: var(--color-primary);
    background: var(--color-primary-disabled);
    color: var(--color-primary);
}

.radio-options--large .radio-options__input:checked + .radio-options__label {
    border-color: var(--color-primary);
    background: var(--color-primary-disabled);
    color: inherit;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.radio-options--large .radio-options__input:checked + .radio-options__label::before {
    transform: scaleX(1);
    background: var(--color-primary);
}

.radio-options__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.radio-options__description {
    color: var(--color-off-black);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
    flex-grow: 1;
}

.radio-options__requirements {
    margin-top: auto;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.3;
    font-style: italic;
}

/* Progress Bar */
.calculator__progress {
    padding: 24px 32px 18px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.calculator__progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.calculator__progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 16.67%; /* Default for step 1 */
}

.calculator__progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}

.calculator__step-counter {
    font-weight: 600;
}

/* Content */
.calculator__content {
    padding: 24px 32px 10px;
}

.calculator__step {
    display: none;
}

.calculator__step--active {
    display: block;
}

.calculator__step-question {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-black);
}

.calculator__step-description {
    margin: 0 0 16px 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.5;
}

.calculator__step-info {
    background: var(--color-secondary-light);
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--color-secondary);
}

/* Calculation Types Cards */
.calculation-types {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.calculation-types__item {
    position: relative;
}

.calculation-types__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.calculation-types__label {
    display: block;
    padding: 24px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculation-types__label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.calculation-types__label:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.calculation-types__input:checked + .calculation-types__label {
    border-color: var(--color-primary);
    background: var(--color-primary-disabled);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.calculation-types__input:checked + .calculation-types__label::before {
    transform: scaleX(1);
    background: var(--color-primary);
}

.calculation-types__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.calculation-types__description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Building Types */
.building-types {
    display: grid;
    gap: 16px;
}

.building-types__item {
    position: relative;
}

.building-types__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.building-types__label {
    display: block;
    padding: 14px 18px 10px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.building-types__label:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.building-types__input:checked + .building-types__label {
    border-color: var(--color-primary);
    background: var(--color-primary-disabled);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.building-types__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.building-types__description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Input Fields */
.number-input, .select-input {
    position: relative;
}

.number-input__field, .select-input__field {
    width: 100%;
    padding: 16px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.number-input__field:focus, .select-input__field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.number-input__range {
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

/* Results */
.results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    margin-top: 16px;
}

.results__title {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-black);
}

.results__final-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin: 24px 0;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid var(--color-primary);
}

/* Results disclaimer */
.results__disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
    text-align: center;
}

.results__disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.4;
}

/* Variants */
.variants {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.variants__item {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.variants__item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.variants__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.variants__price {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.variants__highlights-title {
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 8px;
}

.variants__highlights-list {
    margin: 0;
    padding-left: 20px;
}

.variants__highlights-item {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

/* Navigation */
.calculator__navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 32px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.nav-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.nav-button--primary {
    background: var(--color-primary);
    color: white;
}

.nav-button--primary:hover:not(:disabled) {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.nav-button--primary:hover:disabled {
    background: var(--color-primary);
    opacity: 0.5;
}

.nav-button--secondary.nav-button--secondary {
    background: #ffffff;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.nav-button--secondary.nav-button--secondary:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.nav-button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Modifier: calculator--loading */
.calculator--loading {
    pointer-events: none;
}

.calculator--loading .nav-button--primary {
    background: var(--color-primary-disabled);
    animation: pulse 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator {
        margin: 16px;
        border-radius: 8px;
    }
    
    .calculator__header,
    .calculator__content,
    .calculator__navigation {
        padding: 24px;
    }
    
    .calculator__progress {
        padding: 16px 24px;
    }
    
    .radio-options--horizontal {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .radio-options--large {
        gap: 12px;
    }
    
    .radio-options--large .radio-options__label {
        padding: 20px;
    }
    
    .radio-options__title {
        font-size: 18px;
    }
    
    .radio-options__description {
        font-size: 13px;
    }
    
    .radio-options__requirements {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .building-types,
    .variants {
        gap: 12px;
    }
    
    .radio-options {
        flex-direction: column;
        gap: 12px;
    }
    
    /* .calculator__navigation {
        flex-direction: column;
    } */
    
    .nav-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calculator__header {
        padding: 20px 15px;
    }
    
    .calculator__title {
        font-size: 20px;
    }
    
    .calculator__content {
        padding: 20px 15px;
        min-height: 250px;
    }
    
    .calculator__step-question {
        font-size: 16px;
    }
    
    .nav-button {
        min-width: 80px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

/* Contact Form Styles */
.contact-form {
    width: 100%;
}

.contact-form__row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-form__field {
    flex: 1;
    min-width: 0;
}

.contact-form__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.contact-form__input {
    width: 100%;
    padding: 12px !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
    background: white;
    box-sizing: border-box;
}

.contact-form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Only show validation colors after user interaction */
.contact-form__input.has-been-focused:invalid:not(:focus) {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.contact-form__input.has-been-focused:valid:not(:focus) {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Responsive contact form */
@media (max-width: 640px) {
    .contact-form__row {
        flex-direction: column;
        gap: 8px;
    }
}

/* Form validation states */
.form-field--error .contact-form__input {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-field--success .contact-form__input {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Email Status Messages */
.email-status {
    margin-bottom: 32px;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.email-status h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.email-status p {
    margin: 0;
    line-height: 1.5;
}

.email-status--success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
    color: #166534;
}

.email-status--success h4 {
    color: #15803d;
}

.email-status--error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.email-status--error h4 {
    color: #dc2626;
}

/* Selected calculation method display */
.calculator__selected-method {
    background-color: var(--color-secondary-light);
    /* Very light secondary color for backgrounds */
    
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 3px solid var(--color-secondary);
}

.calculator__method-text {
    margin: 0;
    color: var(--color-black);
    font-size: 14px;
}

.calculator__method-text strong {
    color: var(--color-secondary);
    font-weight: 600;
}

/* Disclaimer styles */
.calculator__disclaimer {
    background-color: #fff3cd;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 3px solid #ffc107;
    font-size: 14px;
    color: #856404;
}

.results__orientation-disclaimer {
    background-color: #fff3cd;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    border-left: 3px solid #ffc107;
}

.results__orientation-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Admin Interface Enhancements */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

.nav-tab {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    background: #f1f1f1;
}

.nav-tab-active {
    background: #fff;
    border-bottom-color: #fff;
    color: var(--color-black);
}

/* Settings sections styling */
.form-table th {
    width: auto;
}

.form-table td {
    padding: 15px 10px;
}

/* API Key field styling */
#google_api_key {
    font-family: monospace;
    letter-spacing: 1px;
}

/* Success indicators */
.api-test-success {
    color: #008000;
    font-weight: bold;
}

.api-test-error {
    color: #d63638;
    font-weight: bold;
}

/* Settings cards */
.postbox {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.postbox-header h2 {
    margin: 0;
    padding: 8px 12px;
    background: #f6f7f7;
    border-bottom: 1px solid #ccd0d4;
    font-size: 14px;
}

.postbox .inside {
    padding: 12px;
}

/* Auto-fill city field enhancement */
#contact-city.auto-filled {
    border-color: #00a000;
    box-shadow: 0 0 5px rgba(0, 160, 0, 0.3);
    transition: all 0.3s ease;
}

/* Debug mode indicators */
.debug-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    color: #856404;
}

/* Enhanced form styling for admin */
.form-table input[type="number"],
.form-table input[type="email"],
.form-table input[type="text"],
.form-table input[type="password"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-table input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive admin interface */
@media screen and (max-width: 782px) {
    .nav-tab-wrapper {
        margin-bottom: 10px;
    }
    
    .nav-tab {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: auto;
        padding: 10px 0;
    }
    
    .form-table th {
        padding-bottom: 0;
    }
}

/* REHAU Badge - Diagonal ribbon in top right corner of PEX-a variant */
.variants__rehau-badge {
    position: absolute;
    top: 100px;
    right: 25px;
    background: var(--color-secondary);
    color: white;
    padding: 6px 35px;
    transform: rotate(45deg);
    transform-origin: center;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.variants__rehau-text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive styles for REHAU badge */
@media (max-width: 768px) {
    .variants__rehau-badge {
        top: 12px;
        right: -20px;
        padding: 5px 28px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .variants__rehau-badge {
        top: 10px;
        right: -18px;
        padding: 4px 25px;
        font-size: 8px;
        letter-spacing: 0.3px;
    }
} 