/**
 * Ekoinstal Energy Widgets - CSS
 * Solar (PVGIS) and Wind (NASA POWER) widget styles
 */

/* Base widget styles */
.ekoinstal-solar-widget,
.ekoinstal-wind-widget,
.ekoinstal-energy-cta,
.ekoinstal-gmina-intro {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

.ekoinstal-solar-widget *,
.ekoinstal-wind-widget *,
.ekoinstal-energy-cta *,
.ekoinstal-gmina-intro * {
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .ekoinstal-solar-widget,
    .ekoinstal-wind-widget {
        margin: 24px 0 !important;
    }

    .ekoinstal-solar-widget h3,
    .ekoinstal-wind-widget h3 {
        font-size: 16px !important;
    }

    .ekoinstal-solar-widget h4,
    .ekoinstal-wind-widget h4 {
        font-size: 14px !important;
    }

    /* Stack stats on mobile */
    .ekoinstal-wind-widget > div > div:last-child > div {
        flex-direction: column !important;
    }

    /* Wind rose smaller on mobile */
    .wind-rose {
        width: 140px !important;
        height: 140px !important;
    }

    .wind-rose svg {
        width: 140px !important;
        height: 140px !important;
    }

    /* CTA adjustments */
    .ekoinstal-energy-cta {
        padding: 24px 16px !important;
        margin: 32px 0 !important;
    }

    .ekoinstal-energy-cta h3 {
        font-size: 20px !important;
    }

    .ekoinstal-energy-cta ul {
        font-size: 14px !important;
    }
}

/* Print styles */
@media print {
    .ekoinstal-solar-widget,
    .ekoinstal-wind-widget {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .ekoinstal-energy-cta {
        display: none !important;
    }
}

/* Animation for wind rose (optional, subtle) */
@keyframes wind-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.wind-rose line {
    animation: wind-pulse 3s ease-in-out infinite;
}

/* Contact Form 7 integration */
.ekoinstal-cta-form .wpcf7 {
    margin: 0;
}

.ekoinstal-cta-form .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ekoinstal-cta-form .wpcf7-form p {
    margin: 0;
}

.ekoinstal-cta-form .wpcf7-form-control:not([type="submit"]) {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ekoinstal-cta-form .wpcf7-form-control:not([type="submit"]):focus {
    border-color: #70B221;
    box-shadow: 0 0 0 3px rgba(112, 178, 33, 0.15);
    outline: none;
}

.ekoinstal-cta-form .wpcf7-submit {
    background: linear-gradient(135deg, #70B221 0%, #5a9a18 100%);
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ekoinstal-cta-form .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 178, 33, 0.3);
}

.ekoinstal-cta-form .wpcf7-submit:active {
    transform: translateY(0);
}

/* Validation states */
.ekoinstal-cta-form .wpcf7-not-valid {
    border-color: #ef4444 !important;
}

.ekoinstal-cta-form .wpcf7-not-valid-tip {
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
}

.ekoinstal-cta-form .wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
}

.ekoinstal-cta-form .wpcf7-mail-sent-ok {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
}

.ekoinstal-cta-form .wpcf7-validation-errors {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}
