/**
 * Popup CF7 - Style
 * Plik: assets/css/popup-cf7.css
 */

/* ===================================
   OVERLAY I KONTENER GŁÓWNY
   =================================== */

.popup-cf7-overlay {
    display: none; /* Domyślnie ukryty */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Ciemne półprzezroczyste tło */
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-cf7-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ===================================
   KONTENER POPUPU
   =================================== */

.popup-cf7-container {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    animation: slideDown 0.4s ease-out;
}

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

/* ===================================
   PRZYCISK ZAMKNIĘCIA
   =================================== */

.popup-cf7-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #0066a1;
    color: #ffffff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
	padding: 3px 0 0 0;
	transform-origin: center;
}

.popup-cf7-close:hover {
    background: #004d7a;
}

/* ===================================
   LAYOUT TREŚCI
   =================================== */

.popup-cf7-content {
    display: flex;
    flex-wrap: wrap;
}

.popup-cf7-form-section {
    flex: 1;
    padding: 50px 40px 40px;
    min-width: 300px;
}

.popup-cf7-image-section {
    flex: 0 0 340px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f2 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    position: relative;
	padding: 0 20px;
}

.popup-cf7-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="%230066a1" opacity="0.1"/><circle cx="80" cy="40" r="2" fill="%230066a1" opacity="0.15"/><circle cx="60" cy="80" r="2.5" fill="%230066a1" opacity="0.1"/><circle cx="30" cy="70" r="2" fill="%230066a1" opacity="0.12"/></svg>');
    background-size: 150px 150px;
    pointer-events: none;
}

.popup-cf7-image {
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* ===================================
   NAGŁÓWEK I TEKST
   =================================== */

.popup-cf7-heading {
    font-size: 24px;
    font-weight: bold;
    color: #0066a1;
    margin: 0 0 25px;
    line-height: 1.3;
}

.popup-cf7-description {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    margin: 20px 0 15px;
}

.popup-cf7-description a {
    color: #0066a1;
    text-decoration: underline;
}

/* ===================================
   FORMULARZ CONTACT FORM 7
   =================================== */

.popup-cf7-form {
    margin: 0 0 15px;
}

/* Stylizacja pól formularza */
.popup-cf7-form input[type="text"],
.popup-cf7-form input[type="email"],
.popup-cf7-form input[type="tel"],
.popup-cf7-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.popup-cf7-form input:focus,
.popup-cf7-form textarea:focus {
    outline: none;
    border-color: #0066a1;
}

/* Stylizacja przycisku submit */
.popup-cf7-form input[type="submit"],
.popup-cf7-form button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #0066a1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.popup-cf7-form input[type="submit"]:hover,
.popup-cf7-form button[type="submit"]:hover {
    background: #004d7a;
}

/* Wiadomości walidacyjne CF7 */
.popup-cf7-form .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #dc3232;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
}

.popup-cf7-form .wpcf7-response-output {
    margin: 15px 0 0;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
}

/* ===================================
   LOGO
   =================================== */

.popup-cf7-logo {
    text-align: left;
    margin-top: 20px;
}

.popup-cf7-logo svg {
    max-width: 120px;
    height: auto;
}

/* ===================================
   PRZYCISK OTWIERAJĄCY POPUP
   =================================== */

.open-popup {
    padding: 12px 30px;
    background: #0066a1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.open-popup:hover {
    background: #004d7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 161, 0.3);
}

/* ===================================
   RESPONSYWNOŚĆ
   =================================== */

@media (max-width: 768px) {
    .popup-cf7-overlay {
        padding: 10px;
    }

    .popup-cf7-content {
        flex-direction: column;
    }

    .popup-cf7-form-section {
        padding: 40px 25px 25px;
        order: 1;
    }

    .popup-cf7-image-section {
        flex: 0 0 auto;
        min-height: 250px;
        border-radius: 0 0 8px 8px;
        order: 2;
    }

    .popup-cf7-heading {
        font-size: 20px;
    }

    .popup-cf7-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
	.popup-cf7-image{
		max-height: 250px;
	}
}

@media (max-width: 480px) {
    .popup-cf7-form-section {
        padding: 35px 20px 20px;
    }

    .popup-cf7-heading {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .popup-cf7-image-section {
        min-height: 220px;
    }
}