/* Solar Preventivatore Styles */

/* ====================
   PREVENTIVATORE HERO SECTION
   ==================== */
.preventivatore-main-container {
    animation: fadeInUp 0.8s ease-out;
    width: 100%;
    max-width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trust-badge {
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.trust-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
}

.trust-badge i {
    transition: all 0.3s ease;
}

.trust-badge:hover i {
    transform: scale(1.1);
}

/* Card principale del preventivatore */
.preventivatore-main-container .card {
    border: none !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
}

.preventivatore-main-container .card-header {
    border: none;
    padding: 2rem !important;
}

.preventivatore-main-container .card-body {
    background: white;
}

/* Alert promozionale animato */
.alert-success {
    animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(40, 167, 69, 0.5);
    }
}

/* ====================
   BASIC MAP STYLES
   ==================== */
#roof-map {
    position: relative;
}

/* Preventivatore container positioning */
#solar-calculator-advanced {
    position: relative;
    min-height: auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    #solar-calculator-advanced {
        min-height: 600px;
        padding: 2rem;
    }
}

/* Badge styles */
.badge.bg-white {
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

#roof-map::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #FF6B35;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Panel overlay map - responsive heatmaps */
#panel-overlay-map {
    position: relative;
}

#panel-overlay-map::before {
    content: '🎯 Heatmaps solari attive';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(34, 139, 34, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Nascondi l'indicatore se non ci sono layer attivi */
#panel-overlay-map:not(.has-active-layers)::before {
    display: none;
}

.roof-mapper-container {
    min-height: auto;
}

@media (min-width: 768px) {
    .roof-mapper-container {
        min-height: 400px;
    }
}

.controls-section .card {
    height: fit-content;
    position: relative;
    z-index: 90;
    transition: all 0.3s ease-in-out;
}

@media (min-width: 992px) {
    .controls-section .card {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

.position-info code {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ====================
   PRICE TRACKER
   ==================== */
.price-tracker-wrapper {
    margin-bottom: 1rem;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

@media (min-width: 992px) {
    .price-tracker-wrapper {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

.price-tracker {
    animation: slideInDown 0.5s ease-out;
    width: 100%;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    border-radius: 16px;
    transition: box-shadow 0.3s ease-in-out;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
}

.price-tracker.bg--theme {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
}

/* Enhanced shadow when sticky */
.price-tracker-wrapper.is-sticky .price-tracker {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    transform: translateY(-2px);
}

.price-tracker .display-6 {
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-tracker .fa-piggy-bank {
    animation: pulse 2s infinite;
}

/* Spinner personalizzato */
.spinner-border {
    border-width: 0.3rem;
}

/* Configuration panel styles */
.configuration-main-panel {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .configuration-main-panel {
        border-radius: 8px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
}

.form-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6 !important;
}

.sticky-sidebar {
    position: relative;
}

@media (min-width: 992px) {
    .sticky-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
        will-change: transform;
    }
}

.summary-card, .financing-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.summary-card h5, .financing-card h5 {
    color: #FF6B35;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Progress bar styling */
.progress {
    background-color: #e9ecef;
}

.progress-bar.bg--theme {
    background: linear-gradient(90deg, #FF6B35 0%, #F7931E 100%);
    transition: width 0.6s ease;
}

/* Mobile optimizations for preventivatore */
@media (max-width: 768px) {
    .preventivatore-main-container .card-header {
        padding: 1rem !important;
    }
    
    .preventivatore-main-container .card-header h3 {
        font-size: 1.25rem;
    }
    
    .trust-badge {
        padding: 12px;
    }
    
    .preventivatore-main-container {
        padding: 0;
    }
}

/* Mobile optimizations for price tracker */
@media (max-width: 768px) {
    .price-tracker-wrapper {
        position: relative !important;
        top: auto !important;
        margin-bottom: 1rem;
    }
    
    .price-tracker {
        padding: 0.75rem !important;
        border-radius: 12px;
    }
    
    .price-tracker .display-6 {
        font-size: 1.5rem !important;
    }
    
    .price-tracker .h4 {
        font-size: 1.1rem !important;
    }
    
    .price-tracker small {
        font-size: 0.75rem !important;
    }
    
    .price-tracker .fa-piggy-bank {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 576px) {
    .price-tracker .display-6 {
        font-size: 1.5rem !important;
    }
    
    .price-tracker .h4 {
        font-size: 1.1rem !important;
    }
    
    .price-tracker .fa-piggy-bank {
        font-size: 1.75rem !important;
    }
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-update-estimate {
    opacity: 0.8;
    transition: all 0.2s ease;
}

.btn-update-estimate:hover {
    opacity: 1;
    transform: rotate(180deg);
}

.price-progress .progress {
    border-radius: 2px;
}

/* ====================
   PRELIMINARY COST POPUP
   ==================== */
.preliminary-cost-popup .cost-range {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}

.preliminary-cost-popup .row > div {
    margin-bottom: 10px;
}

.preliminary-cost-popup .border {
    border: 2px solid #dee2e6 !important;
    transition: all 0.2s ease;
}

.preliminary-cost-popup .border:hover {
    border-color: #007bff !important;
    transform: translateY(-2px);
}

/* ====================
   ADDRESS AUTOCOMPLETE
   ==================== */
.address-input-container .input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.suggestions-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e9ecef !important;
}

.suggestion-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item.active .suggestion-hover,
.suggestion-item:hover .suggestion-hover {
    background-color: #f8f9fa !important;
}

.suggestion-item.active {
    border-left: 3px solid #007bff;
}

.suggestion-hover {
    transition: background-color 0.15s ease;
}

.suggestion-content mark {
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

.no-suggestions {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.address-confirmation {
    animation: slideInUp 0.3s ease-out;
}

.compact-address-confirmation .text-truncate {
    font-size: 0.9rem;
}

/* ====================
   ROOF MAPPER STYLES
   ==================== */
.roof-mapper-wrapper {
    animation: slideInUp 0.5s ease-out;
}

.map-action-header {
    animation: slideInDown 0.4s ease-out;
}

#roof-selection-controls {
    transition: all 0.3s ease;
}

.bg-success .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-body {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0.5rem !important;
}

/* Fix for analyzed roof card */
#roof-selection-controls .bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.bg-success .bg-white.bg-opacity-20 {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-success .bg-white.bg-opacity-20 .fw-bold,
.bg-success .bg-white.bg-opacity-20 small {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bg-success .btn-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: #28a745 !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
}

.bg-success .btn-light:hover {
    background: white !important;
    border-color: white !important;
    color: #1e7e34 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.bg-success .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
}

.bg-success .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: white !important;
}

/* ====================
   CONSUMPTION SELECTION
   ==================== */
.consumption-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
}

.consumption-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--theme-color) !important;
}

.consumption-card.selected {
    border-color: var(--theme-color) !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.consumption-card.selected .card-body {
    background: transparent;
}

.consumption-card.selected i {
    color: var(--theme-color) !important;
}

.consumption-card.selected h6 {
    color: var(--theme-color) !important;
    font-weight: 700;
}

/* ====================
   BATTERY OPTIONS
   ==================== */
.battery-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6 !important;
    position: relative;
    overflow: hidden;
}

.battery-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--theme-color) !important;
}

.battery-option.selected {
    border-color: var(--theme-color) !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.battery-option.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    background: var(--theme-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.battery-option.selected i {
    color: var(--theme-color) !important;
}

.battery-option.selected h5 {
    color: var(--theme-color) !important;
    font-weight: 700;
}

.battery-option.selected .badge {
    background: var(--theme-color) !important;
    animation: pulse 2s infinite;
}

/* ====================
   INCENTIVE OPTIONS
   ==================== */
.incentive-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef !important;
}

.incentive-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.incentive-option.selected {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.incentive-option .benefits {
    min-height: 60px;
}

/* ====================
   GUTTER SELECTION
   ==================== */
.gutter-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    border-radius: 10px;
}

.gutter-selection-panel {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.5s ease-out;
}

.gutter-direction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.75rem;
    max-width: 200px;
    margin: 1.5rem auto;
}

.gutter-btn {
    aspect-ratio: 1;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.gutter-btn:hover {
    border-color: var(--theme-color);
    background: #fff5f2;
    transform: scale(1.05);
}

.gutter-btn.selected {
    border-color: var(--success-color);
    background: #e8f5e8;
    color: var(--success-color);
}

.gutter-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.gutter-confirmation {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px;
    border-radius: 10px;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.5s ease;
}

.roof-outline-highlight {
    stroke: var(--theme-color) !important;
    stroke-width: 3px !important;
    stroke-dasharray: 5, 5;
    animation: dash 2s linear infinite;
}

/* ====================
   QUOTE RESULTS
   ==================== */
.quote-results {
    animation: slideInUp 0.6s ease-out;
}

.result-card {
    border-radius: 1rem !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.result-card.bg--theme {
    background: var(--theme-color) !important;
    color: white;
}

.result-card.bg-success {
    background: var(--success-color) !important;
    color: white;
}

.result-card.bg-warning {
    background: #ffc107 !important;
    color: #212529;
}

.result-card.bg-info {
    background: #17a2b8 !important;
    color: white;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.result-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-content p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.result-content small {
    opacity: 0.8;
    font-size: 0.9rem;
}

.cost-breakdown {
    background: white !important;
    border: 2px solid #e9ecef;
    border-radius: 1rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cost-breakdown .divider {
    border-color: #dee2e6 !important;
    margin: 1rem 0;
}

.cost-breakdown .color--theme {
    color: var(--theme-color) !important;
}

.highlight {
    background: #f8f9fa !important;
    border: 2px solid var(--success-color);
    border-radius: 1rem !important;
}

.highlight .color--theme {
    color: var(--success-color) !important;
}

/* Environmental stats */
.environmental-stats .stat-item {
    background: white !important;
    border: 2px solid #e9ecef;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease;
}

.environmental-stats .stat-item:hover {
    border-color: var(--success-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.environmental-stats .stat-item i {
    color: var(--success-color) !important;
}

/* Next steps */
.next-steps .step-item {
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.next-steps .step-item:hover {
    border-color: var(--theme-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.step-number {
    background: var(--theme-color) !important;
    color: white !important;
    min-width: 35px;
    height: 35px;
    font-weight: 700;
}

.step-item h6 {
    color: var(--theme-color) !important;
    font-weight: 700;
}

/* Call to action buttons */
.btns-group .btn {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease;
    border: none !important;
}

.btns-group .btn--theme {
    background: var(--theme-color) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btns-group .btn--theme:hover {
    background: #e55a2b !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btns-group .btn--tra-white {
    background: white !important;
    color: var(--theme-color) !important;
    border: 2px solid var(--theme-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btns-group .btn--tra-white:hover {
    background: var(--theme-color) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Card headers */
.card-header.bg--theme {
    background: var(--theme-color) !important;
    color: white !important;
    border-radius: 1rem 1rem 0 0 !important;
    border: none;
    font-weight: 600;
}

.card-header.bg-warning {
    background: #ffc107 !important;
    color: #212529 !important;
    border-radius: 1rem 1rem 0 0 !important;
    border: none;
    font-weight: 600;
}

/* ====================
   UTILITY CLASSES
   ==================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.divider-text {
    position: relative;
    text-align: center;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
    z-index: 1;
}

.divider-text small {
    position: relative;
    z-index: 2;
}

.btn-group .btn-check:checked + .btn {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: white !important;
    font-weight: 600;
}

.btn-group .btn-outline-primary:hover {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
}

.flash-success {
    animation: flashSuccess 0.6s ease-out;
}

.card,
.card-body {
    border-radius: 0.5rem !important;
}

/* Section spacing */
.fbox-wrapper.mb-80 {
    margin-bottom: 3rem !important;
}

.mt-80 {
    margin-top: 3rem !important;
}

/* ====================
   ANIMATIONS
   ==================== */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes flashSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
        transform: scale(1);
    }
}

@keyframes flashGreen {
    0% { background-color: transparent; }
    50% { background-color: rgba(40, 167, 69, 0.1); }
    100% { background-color: transparent; }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Result cards staggered animation */
.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

/* ====================
   TOGGLE SWITCHES
   ==================== */
.option-toggle-container {
    margin-bottom: 1.5rem;
}

.option-toggle-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-toggle-card:hover {
    border-color: var(--theme-color);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.option-toggle-card[data-option-type="battery"]:hover {
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.option-toggle-card[data-option-type="incentive"]:hover {
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
}

.option-toggle-card[data-option-type="charger"]:hover {
    border-color: #17a2b8;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.15);
}

.option-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-toggle-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
    animation: slideDown 0.3s ease-out;
}

/* Large toggle switches */
.form-switch-lg {
    min-height: 1.5rem;
}

.form-switch-lg .form-check-input {
    width: 3.5rem;
    height: 1.75rem;
    background-color: #dee2e6;
    border: none;
    transition: all 0.3s ease;
}

.form-switch-lg .form-check-input:checked {
    background-color: var(--theme-color);
}

.option-toggle-card[data-option-type="battery"] .form-check-input:checked {
    background-color: #28a745;
}

.option-toggle-card[data-option-type="incentive"] .form-check-input:checked {
    background-color: #ffc107;
}

.option-toggle-card[data-option-type="charger"] .form-check-input:checked {
    background-color: #17a2b8;
}

.form-switch-lg .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

.option-toggle-card .fs-3 {
    font-size: 2rem !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Sticky Savings Bar */
.sticky-savings-bar {
    position: sticky;
    top: 10px;
    z-index: 90;
    margin-bottom: 1rem;
}

.sticky-savings-bar .bg--theme {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Mobile optimizations for toggles */
@media (max-width: 768px) {
    .option-toggle-container {
        margin-bottom: 0.5rem;
    }
    
    .option-toggle-card {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
        border-radius: 10px;
    }
    
    .option-toggle-card .fs-4 {
        font-size: 1.25rem !important;
    }
    
    .option-toggle-card strong {
        font-size: 0.95rem;
    }
    
    .option-toggle-card small {
        font-size: 0.75rem;
    }
    
    .option-toggle-details {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .option-toggle-details small {
        font-size: 0.7rem;
    }
    
    .form-switch-lg .form-check-input {
        width: 2.75rem;
        height: 1.5rem;
    }
    
    /* Stack verticale su mobile per i toggle */
    .row > .col-lg-4,
    .row > .col-md-6,
    .row > .col-sm-6 {
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Stack verticalmente su mobile */
    .form-section .row > .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Options configuration mobile */
    .options-configuration {
        margin-bottom: 1rem !important;
    }
    
    .options-configuration h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
    }
    
    /* Option sections sempre full-width su mobile */
    .option-section {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* Sticky savings bar animation */
    .sticky-savings-bar .fa-piggy-bank {
        animation: pulse 2s infinite;
    }
    
    /* Sticky summary bar mobile enhancements */
    .sticky-summary-bar .summary-item {
        margin-bottom: 0.5rem;
    }
    
    .sticky-summary-bar #sticky-monthly-savings {
        order: 1 !important;
    }
    
    .sticky-summary-bar #sticky-monthly-savings .fa-piggy-bank {
        animation: pulse 2s infinite;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .sticky-summary-bar .fs-4 {
        font-size: 1.5rem !important;
    }
    
    /* Ottimizzazione card finanziamento mobile */
    .financing-configuration .card-body {
        padding: 0.75rem !important;
    }
    
    .duration-controls .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .duration-controls .mb-2 {
        margin-bottom: 0.25rem !important;
    }
    
    .payment-preview-large {
        padding: 0.75rem !important;
    }
    
    .payment-amount {
        font-size: 2rem !important;
    }
    
    .duration-display .fs-5 {
        font-size: 1.25rem !important;
    }
    
    /* Slider più compatto */
    .form-range {
        margin-bottom: 0.5rem !important;
    }
    
    /* Ottimizzazione specifica rata mensile e dettagli */
    .payment-preview-large .row {
        align-items: center !important;
    }
    
    .payment-preview-large .col-12:first-child {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .payment-preview-large .col-12:last-child {
        margin-top: 0 !important;
    }
    
    .payment-details .row {
        justify-content: center !important;
    }
    
    .payment-details .col-4 {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 70px !important;
        margin: 0 0.5rem !important;
    }
    
    .payment-details small {
        font-size: 0.8rem !important;
        display: block !important;
        margin-bottom: 0.25rem !important;
    }
    
    .payment-details .fw-bold {
        font-size: 1rem !important;
        white-space: nowrap !important;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    /* Card finanziamento ancora più compatta */
    .financing-configuration .card-body {
        padding: 0.5rem !important;
    }
    
    .payment-preview-large {
        padding: 0.5rem !important;
    }
    
    /* Rata mensile più piccola su mobile */
    .payment-amount {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Titolo durata ancora più corto */
    .duration-title-short {
        font-size: 0.9rem !important;
    }
    
    /* Dettagli in una riga orizzontale più compatta */
    .payment-details .col-4 {
        min-width: 60px !important;
        margin: 0 0.25rem !important;
    }
    
    .payment-details small {
        font-size: 0.75rem !important;
    }
    
    .payment-details .fw-bold {
        font-size: 0.95rem !important;
    }
    
    /* Slider labels più piccoli */
    .duration-controls .small {
        font-size: 0.65rem !important;
    }
    
    /* Display durata più compatto */
    .duration-display .fs-5 {
        font-size: 1.1rem !important;
    }
    
    /* Ottimizzazione Analisi Energetica mobile */
    .advanced-metrics {
        margin-top: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .advanced-metrics .mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .advanced-metrics .row {
        margin-bottom: 0.5rem !important;
    }
    
    /* Metriche compatte */
    .metric-label {
        font-size: 0.7rem !important;
        color: #6c757d !important;
        margin-bottom: 0.25rem !important;
        display: block !important;
    }
    
    .metric-value {
        font-weight: bold !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.1 !important;
    }
    
    .metric-unit {
        font-size: 0.65rem !important;
        color: #6c757d !important;
        display: block !important;
    }
    
    .metric-card {
        padding: 0.5rem !important;
    }
    
    /* Campo consumo integrato */
    .consumption-input-section .input-group-sm .form-control {
        font-size: 0.85rem !important;
        padding: 0.375rem 0.5rem !important;
    }
    
    .consumption-input-section .input-group-text {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.5rem !important;
    }
    
    .consumption-input-section .form-label {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Controlli livelli solari mobile */
    .solar-controls-container {
        margin: 0.5rem !important;
    }
    
    .solar-controls-panel {
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 0.5rem !important;
        border-radius: 6px !important;
        max-width: 180px !important;
    }
    
    .solar-controls-header {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .solar-layer-option {
        margin-bottom: 0.25rem !important;
    }
    
    .solar-layer-option .form-check-label {
        font-size: 0.75rem !important;
    }
}

/* ====================
   CONTROLLI LIVELLI SOLARI
   ==================== */
.solar-controls-container {
    margin: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.solar-controls-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 12px;
    min-width: 200px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.solar-controls-header {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.solar-controls-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.solar-layer-option {
    margin: 0;
}

.solar-layer-option .form-check {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    padding: 6px 4px;
}

.solar-layer-option .form-check:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.solar-layer-option .form-check-input {
    margin: 0 8px 0 0;
}

.solar-layer-option .form-check-label {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.solar-layer-option .form-check-label i {
    width: 16px;
    text-align: center;
}

/* ====================
   MOBILE FULL-WIDTH FIXES  
   ==================== */

/* Ensure block--shadow and step-content are full-width on mobile */
@media (max-width: 768px) {
    .block--shadow.r-16.p-5 {
        margin: 0 !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .step-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem !important;
    }
    
    /* Ensure container doesn't add extra padding on mobile */
    .content-section {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Also fix any JS-generated form containers */
    .step-content .row,
    .step-content .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix for sopralluogo completato section */
    .solar-configurator-full {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .configurator-body {
        padding: 0.75rem !important;
        margin: 0 !important;
    }
    
    .full-width-configuration {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .configuration-grid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .configuration-grid .row {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .configuration-grid .col-12,
    .configuration-grid .col-lg-4,
    .configuration-grid .col-lg-8 {
        padding: 0.25rem !important;
        margin: 0 !important;
    }
    
    /* Panel map container mobile fixes */
    .panel-map-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Final CTA section */
    .final-cta {
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Fix width progression from preventivatore-card to step-content */
    .preventivatore-container .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .preventivatore-card {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .preventivatore-card .p-3.p-md-4 {
        padding: 0.5rem !important;
    }
    
    #solar-calculator-full,
    #solar-calculator-advanced {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Hide vista satellitare when showing results (step 8) OR when panel map is visible */
body.results-visible .trust-indicators .trust-item:nth-child(3),
body.panel-map-visible .trust-indicators .trust-item:nth-child(3) {
    display: none !important;
}

/* Alternative approach: hide by targeting the satellite icon */
body.results-visible .trust-indicators .fa-satellite,
body.panel-map-visible .trust-indicators .fa-satellite {
    display: none !important;
}

body.results-visible .trust-indicators .trust-item:nth-child(3) small,
body.panel-map-visible .trust-indicators .trust-item:nth-child(3) small {
    display: none !important;
}

/* ====================
   PANEL MAP OVERLAY FIXES
   ==================== */

/* ====================
   PANEL COUNT OVERLAY
   ==================== */

/* Panel count positioning (bottom-right of map) */
.map-overlay-info {
    z-index: 999 !important; /* Below roof data panel */
}

.map-overlay-info .bg-white {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-overlay-info:hover .bg-white {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.map-overlay-info .h4 {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
}

.map-overlay-info small {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Mobile responsive for panel count */
@media (max-width: 768px) {
    .map-overlay-info {
        bottom: 15px !important;
        left: 15px !important;
    }
    
    .map-overlay-info .bg-white {
        padding: 0.75rem !important;
    }
    
    .map-overlay-info .h4 {
        font-size: 1.25rem !important;
    }
    
    .map-overlay-info small {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 576px) {
    .map-overlay-info .bg-white {
        padding: 0.5rem !important;
    }
    
    .map-overlay-info .h4 {
        font-size: 1.1rem !important;
    }
    
    .map-overlay-info small {
        font-size: 0.65rem !important;
    }
}

/* ====================
   EXPANDABLE ROOF DATA PANEL
   ==================== */

/* Expandable Dati Tetto panel */
.expandable-roof-data {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important; /* Above panel count */
    position: relative;
}

.expandable-roof-data.expanded {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 107, 53, 0.3) !important;
}

.solar-controls-header.cursor-pointer {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px !important;
}

.solar-controls-header.cursor-pointer:hover {
    background-color: rgba(255, 107, 53, 0.05) !important;
}

.expand-icon {
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
    color: #666 !important;
}

.expandable-roof-data.expanded .expand-icon {
    transform: rotate(180deg);
    color: #FF6B35 !important;
}

/* Content area */
.solar-controls-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Mobile responsive for roof data panel */
@media (max-width: 768px) {
    .solar-controls-header.cursor-pointer {
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
    }
    
    .solar-controls-header .fw-bold {
        font-size: 0.85rem !important;
    }
    
    .expand-icon {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .solar-controls-header.cursor-pointer {
        padding: 5px 8px !important;
    }
    
    .solar-controls-header .fw-bold {
        font-size: 0.8rem !important;
    }
    
    .expand-icon {
        font-size: 0.7rem !important;
    }
}

/* ====================
   RESPONSIVE DESIGN
   ==================== */
@media (max-width: 768px) {
    .roof-mapper-container {
        display: flex;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .map-section {
        order: 2;
        width: 100% !important;
    }

    .controls-section {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem;
    }

    #roof-map {
        height: 300px !important;
        width: 100% !important;
    }

    .compact-address-confirmation {
        margin-bottom: 0.5rem !important;
    }

    .map-action-header {
        padding: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .map-action-header h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .map-action-header p {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
    }

    .price-tracker-details .d-flex {
        flex-direction: column;
        gap: 1rem !important;
    }

    .price-tracker-wrapper {
        position: relative;
        margin-bottom: 1rem;
        z-index: 100;
    }
    
    .price-tracker {
        width: 100%;
    }

    .suggestions-list {
        max-height: 250px;
    }

    .suggestion-content {
        font-size: 0.9rem;
    }

    .consumption-card,
    .battery-option {
        margin-bottom: 1rem;
    }

    .battery-option.selected::before {
        top: 8px;
        right: 12px;
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .bg-success .btn-light {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .bg-success .bg-white.bg-opacity-20 {
        padding: 0.75rem !important;
    }

    .bg-success .bg-white.bg-opacity-20 .fw-bold {
        font-size: 1rem !important;
    }

    .gutter-selection-panel {
        padding: 1.5rem;
        max-width: 320px;
        margin: 1rem;
    }

    .gutter-direction-buttons {
        max-width: 180px;
        gap: 0.5rem;
    }

    .gutter-btn {
        font-size: 0.75rem;
    }

    .gutter-btn i {
        font-size: 1.25rem;
    }

    .result-card {
        margin-bottom: 1rem;
        padding: 1.5rem !important;
    }

    .result-content h3 {
        font-size: 1.5rem;
    }

    .result-content p {
        font-size: 1rem;
    }

    .cost-breakdown {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .btns-group .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        margin-bottom: 0.75rem;
        width: 100%;
    }

    .environmental-stats .stat-item {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .next-steps .step-item {
        padding: 0.75rem !important;
    }

    .step-number {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    #roof-map {
        height: 250px !important;
        width: 100% !important;
    }

    .controls-section .card-body {
        padding: 0.75rem !important;
        min-height: auto !important;
    }

    .price-tracker-wrapper {
        position: relative !important;
        top: auto !important;
        margin-bottom: 0.75rem;
        z-index: 100;
    }

    .price-tracker .row {
        text-align: center;
    }

    .price-tracker-details .d-flex {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .result-card {
        padding: 1rem !important;
    }

    .result-icon {
        font-size: 2rem;
    }

    .result-content h3 {
        font-size: 1.25rem;
    }

    .cost-breakdown {
        font-size: 0.9rem;
    }

    .highlight {
        padding: 1rem !important;
    }
}

/* ====================
   FINANCING STEP STYLES
   ==================== */

.financing-options-selector {
    max-width: 800px;
    margin: 0 auto;
}

.financing-option-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}

.financing-option-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.financing-option-card.active {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.financing-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    position: relative;
}

.option-icon {
    font-size: 2.5rem;
    color: #007bff;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.option-content {
    flex-grow: 1;
}

.option-content h5 {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.option-content p {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.option-check {
    font-size: 1.5rem;
    color: #28a745;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.financing-option-card.active .option-check {
    opacity: 1;
}

.rate-selector {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.rate-selector .form-label {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.rate-selector select {
    border-color: #007bff;
}

.rate-selector select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#estimated-monthly {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .financing-option {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .option-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .option-check {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .rate-selector {
        margin-top: 1rem;
    }
}

/* ====================
   FINANCING SECTION
   ==================== */

.financing-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid #e3f2fd;
    margin-bottom: 2rem;
}

.financing-section .section-header h5 {
    color: #495057;
    font-weight: 700;
}

.financing-section .section-header hr {
    border-color: #dee2e6;
    opacity: 0.8;
}

.payment-method-selection .option-card {
    transition: all 0.3s ease;
}

.payment-method-selection .option-card:hover {
    transform: translateY(-3px);
}

.payment-method-selection .option-card.selected .card {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

/* Enhanced option card styles for better visibility */
.option-section .option-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-section .option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.option-section .option-card:hover::before {
    left: 100%;
}

.option-section .option-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.option-section .option-card:hover .card {
    border-width: 3px;
}

.option-section .option-card.selected {
    transform: translateY(-4px);
    animation: pulseSelection 2s infinite;
}

.option-section .option-card.selected .card {
    border-width: 3px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

/* Color-coded selection states */
.option-section .option-card[data-option="battery"].selected .card {
    border-color: #28a745 !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%);
}

.option-section .option-card[data-option="incentive"].selected .card {
    border-color: #ffc107 !important;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%);
}

.option-section .option-card[data-option="charger"].selected .card {
    border-color: #17a2b8 !important;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.3);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.05) 0%, rgba(23, 162, 184, 0.02) 100%);
}

.option-section .option-card[data-option="financing"].selected .card {
    border-color: #007bff !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
}

/* Enhanced icons for better visibility */
.option-section .option-card .fas {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.option-section .option-card:hover .fas {
    transform: scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.option-section .option-card.selected .fas {
    transform: scale(1.1);
    animation: iconBounce 0.6s ease;
}

/* Add selection indicator */
.option-section .option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmarkAppear 0.4s ease;
    z-index: 10;
}

/* Color-coded checkmarks */
.option-section .option-card[data-option="battery"].selected::after {
    background: #28a745;
}

.option-section .option-card[data-option="incentive"].selected::after {
    background: #ffc107;
    color: #000;
}

.option-section .option-card[data-option="charger"].selected::after {
    background: #17a2b8;
}

.option-section .option-card[data-option="financing"].selected::after {
    background: #007bff;
}

/* Enhanced text visibility */
.option-section .option-card .fw-bold {
    font-size: 1.1em;
    letter-spacing: 0.02em;
}

.option-section .option-card .badge {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulseSelection {
    0%, 100% { transform: translateY(-4px) scale(1); }
    50% { transform: translateY(-4px) scale(1.01); }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.3); }
}

@keyframes checkmarkAppear {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) rotate(-90deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

/* Section headers enhancement */
.option-section h6 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.option-section h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #F7931E);
    border-radius: 2px;
}

.financing-configuration {
    animation: slideInUp 0.4s ease-out;
}

.financing-configuration .card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid rgba(0, 123, 255, 0.1) !important;
}

.duration-display {
    min-width: 100px;
}

.slider-container {
    padding: 0 0.5rem;
}

.payment-preview {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
    border: 2px solid rgba(0, 123, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.payment-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
}

.payment-amount {
    text-shadow: 0 1px 2px rgba(0, 123, 255, 0.1);
}

.payment-preview-large {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
    border: 2px solid #007bff !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
    transition: all 0.3s ease;
}

.payment-preview-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.2) !important;
}

.inline-summary {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.full-width-configuration {
    max-width: none;
}

.configuration-grid .row {
    align-items: stretch;
}

.slider-container input[type="range"] {
    height: 12px !important;
    border-radius: 6px;
    background: linear-gradient(to right, #007bff 0%, #007bff 50%, #dee2e6 50%, #dee2e6 100%);
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.payment-details .col-4 {
    padding: 0.5rem;
}

.detailed-summary .card-header {
    cursor: pointer;
    transition: all 0.2s ease;
}

.detailed-summary .card-header:hover {
    background: rgba(0, 123, 255, 0.05) !important;
}

.payment-amount.updating {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

/* ====================
   FINANCING RATE SELECTION
   ==================== */

#rate-selection-section {
    display: block; /* Visible by default since financing is selected */
    animation: slideInUp 0.3s ease-out;
}

#rate-selection-section.show {
    display: block;
}

#financing-months-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #007bff 0%, #007bff 100%);
    outline: none;
    transition: all 0.3s ease;
}

#financing-months-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

#financing-months-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

#financing-months-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

#rate-months-display {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.rate-preview {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#monthly-payment-display {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#monthly-payment-display:not(:empty) {
    animation: pulse 0.6s ease-out;
}

.rate-selection-section .card {
    border: 2px solid rgba(0, 123, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(0, 123, 255, 0.1)) !important;
}

/* Summary financing display */
.summary-item.financing-summary {
    background: rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    animation: slideInRight 0.5s ease-out;
}

/* Responsive adjustments for financing */
@media (max-width: 768px) {
    .financing-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .financing-configuration .row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .payment-preview {
        margin-top: 1rem;
    }
    
    .payment-amount {
        font-size: 1.8rem !important;
    }
    
    .duration-display {
        min-width: auto;
        margin-bottom: 1rem;
    }
    
    .slider-container {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .financing-section {
        padding: 0.75rem;
    }
    
    .payment-method-selection .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    .payment-preview {
        padding: 1rem !important;
    }
    
    .payment-amount {
        font-size: 1.5rem !important;
    }
}

/* ====================
   STICKY SUMMARY BAR
   ==================== */

.sticky-summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    transform: translateY(100%);
    transition: all 0.4s ease;
    border-radius: 15px 15px 0 0;
    /* Sfondo completamente opaco */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Garantisce che la barra sia completamente opaca */
.sticky-summary-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    z-index: -1;
    border-radius: 15px 15px 0 0;
}

.sticky-summary-bar.visible {
    transform: translateY(0);
}

/* Aggiunge spazio in fondo per la sticky bar */
body.has-sticky-bar {
    padding-bottom: 120px;
}

@media (max-width: 767px) {
    body.has-sticky-bar {
        padding-bottom: 140px;
    }
}

.sticky-summary-bar .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.sticky-summary-bar .summary-item {
    margin-bottom: 0;
}

.sticky-summary-bar .summary-item small {
    font-size: 0.75rem;
    line-height: 1.2;
}

.sticky-summary-bar .btn-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: #FF6B35 !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.sticky-summary-bar .btn-light:hover {
    background: white !important;
    border-color: white !important;
    color: #E55A2B !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sticky-summary-bar .btn-light:active {
    transform: translateY(0);
}

/* Desktop specifico */
@media (min-width: 768px) {
    .sticky-summary-bar {
        padding: 1.25rem 0;
    }
    
    .sticky-summary-bar .summary-item {
        margin-right: 2rem;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    .sticky-summary-bar {
        padding: 0.875rem 1rem;
    }
    
    .sticky-summary-bar .summary-item {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .sticky-summary-bar .summary-item small {
        font-size: 0.7rem;
    }
    
    .sticky-summary-bar .fw-bold {
        font-size: 0.9rem;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .sticky-summary-bar .row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .sticky-summary-content .d-flex {
        justify-content: space-between;
        flex-wrap: nowrap;
    }
}

@media (max-width: 576px) {
    .sticky-summary-bar .summary-item {
        margin-right: 0.75rem;
    }
    
    .sticky-summary-bar .summary-item small {
        font-size: 0.65rem;
    }
    
    .sticky-summary-bar .fw-bold {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Animazione per il contenuto sticky */
.sticky-summary-bar .summary-item {
    animation: slideInBottom 0.6s ease-out;
    animation-fill-mode: both;
}

.sticky-summary-bar .summary-item:nth-child(1) { animation-delay: 0.1s; }
.sticky-summary-bar .summary-item:nth-child(2) { animation-delay: 0.2s; }
.sticky-summary-bar .summary-item:nth-child(3) { animation-delay: 0.3s; }
.sticky-summary-bar .summary-item:nth-child(4) { animation-delay: 0.4s; }

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

/* ====================
   SINGLE PAGE FORM STYLES
   ==================== */

.solar-single-form {
    max-width: none;
}

.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: #f1f3f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.section-header h6 {
    color: #333;
    font-weight: 600;
}

.panel-selector {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-range:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

.form-range::-webkit-slider-thumb {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
}

.form-range::-moz-range-thumb {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border: none;
}

.battery-options .form-check-label {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.battery-options .form-check-input:checked + .form-check-label {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.charging-options .form-check-label {
    cursor: pointer;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
}

.charging-options .form-check-input:checked + .form-check-label {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

.summary-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.summary-item:last-child {
    border-bottom: none;
}

.payment-type-selector .form-check-label {
    cursor: pointer;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.payment-type-selector .form-check-input:checked + .form-check-label {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    color: #007bff;
}

.rate-preview {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.05) !important;
}

#calculate-quote-btn {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

#calculate-quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

#analyze-roof-btn.btn-success {
    background: #28a745;
    border-color: #28a745;
}

#analyze-roof-btn.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

/* Sticky sidebar adjustments */
@media (min-width: 992px) {
    .sticky-top {
        top: 20px !important;
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .form-section {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin: 0 auto 1rem auto;
    }
}