/* popup.css */

/* Overlay (przyciemnienie tła) */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

/* Popup "Sprawdź termin" */
#contactPopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    z-index: 10001;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

#contactPopup.active {
    opacity: 1;
}

.popup-overlay.active {
    opacity: 1;
}

#contactPopup h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #1a2a44;
}

/* Przycisk zamknięcia */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-popup:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

/* Formularz */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#contactForm label {
    font-size: 16px;
    font-weight: 600;
    color: #1a2a44;
    margin-bottom: 5px;
}

#contactForm input,
#contactForm select {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#contactForm input:focus,
#contactForm select:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
    outline: none;
}

#contactForm input::placeholder,
#contactForm select:invalid {
    color: #999;
    font-style: italic;
}

/* Przycisk wysyłania w formularzu */
#contactForm button[type="submit"] {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
    width: 150px;
    align-self: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#contactForm button[type="submit"]:hover {
    background: linear-gradient(45deg, #ff8e53, #ff6b6b);
    transform: scale(1.05);
}

/* Stylizacja wszystkich .cta-button (button, div, a) */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #ffffff;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    margin: 0 auto;
}

/* Hover dla wszystkich .cta-button */
.cta-button:hover {
    background: linear-gradient(45deg, #ff8e53, #ff6b6b);
    transform: scale(1.05);
    color: #ffffff;
}

/* Kontekstualne wyśrodkowanie w różnych sekcjach */
header.site-header .cta-button-wrapper,
.main-content .com-content-article__body .cta-button,
.bottom-1 .wzk-bottom1-package .cta-button {
    display: flex;
    justify-content: center;
}

/* Zapewnienie, że <a> i <div> zachowują się jak przycisk */
.cta-button[href],
.cta-button:not([href]):not(button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Responsywność */
@media (max-width: 575.98px) {
    #contactPopup {
        width: 95%;
        max-width: 350px;
        padding: 15px;
    }

    #contactPopup h2 {
        font-size: 20px;
    }

    #contactForm label {
        font-size: 14px;
    }

    #contactForm input,
    #contactForm select {
        padding: 10px;
        font-size: 14px;
    }

    #contactForm button[type="submit"] {
        padding: 10px 25px;
        font-size: 14px;
        width: 130px;
    }

    /* Wyrazy pod sobą i wyśrodkowanie dla wszystkich .cta-button */
    button.cta-button {
        display: inline-flex !important;
        flex-direction: column !important;
        white-space: normal !important;
        padding: 10px 15px !important;
        font-size: 1em !important;
        line-height: 1.2 !important;
        margin: 0 auto !important;
        width: auto !important;
        min-width: unset !important;
        max-width: 100% !important;
        background: linear-gradient(45deg, #ff6b6b, #ff8e53) !important;
        border-radius: 50px !important;
    }
}