/* ===========================================
   AP2 WAITING LIST - STYLES
   Kolor akcentowy: #65B040
   =========================================== */

/* ----- FORMULARZ ----- */
.ap2-waiting-list-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}

.ap2-waiting-list-form {
    font-family: inherit;
}

.ap2-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ap2-form-group {
    margin-bottom: 20px;
    width: 100%;
}

.ap2-form-group-half {
    flex: 1;
    min-width: 200px;
}

.ap2-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #333;
    font-size: 15px;
}

.ap2-form-label .required {
    color: #e74c3c;
}

.ap2-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.ap2-form-control:focus {
    outline: none;
    border-color: #65B040;
    box-shadow: 0 0 0 3px rgba(101, 176, 64, 0.15);
}

.ap2-form-control::placeholder {
    color: #999;
}

textarea.ap2-form-control {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox RODO */
.ap2-form-checkbox {
    margin-top: 10px;
}

.ap2-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    line-height: 1.5;
}

.ap2-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ap2-checkbox-indicator {
    position: absolute;
    left: 0;
    top: 2px;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ap2-checkbox-label:hover .ap2-checkbox-indicator {
    border-color: #65B040;
}

.ap2-checkbox-label input:checked ~ .ap2-checkbox-indicator {
    background-color: #65B040;
    border-color: #65B040;
}

.ap2-checkbox-indicator:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ap2-checkbox-label input:checked ~ .ap2-checkbox-indicator:after {
    display: block;
}

.ap2-checkbox-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.ap2-checkbox-text a {
    color: #65B040;
    text-decoration: none;
}

.ap2-checkbox-text a:hover {
    text-decoration: underline;
}

/* Przycisk */
.ap2-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 30px;
    background-color: #65B040;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: inherit;
}

.ap2-submit-button:hover {
    background-color: #5a9e39;
}

.ap2-submit-button:active {
    transform: scale(0.98);
}

.ap2-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.ap2-spinner {
    animation: ap2-rotate 2s linear infinite;
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

.ap2-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: ap2-dash 1.5s ease-in-out infinite;
}

@keyframes ap2-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes ap2-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Komunikaty */
.ap2-form-messages {
    margin-top: 20px;
    padding: 0;
}

.ap2-form-messages .ap2-message {
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.ap2-form-messages .ap2-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ap2-form-messages .ap2-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ----- POPUP ----- */
.ap2-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ap2-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.ap2-popup-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: ap2-popup-appear 0.3s ease;
}

@keyframes ap2-popup-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ap2-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap2-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

.ap2-popup-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #65B040 0%, #7bc950 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap2-popup-icon svg {
    width: 35px;
    height: 35px;
    color: #fff;
}

.ap2-popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
}

.ap2-popup-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 25px;
}

.ap2-popup-button {
    display: inline-block;
    padding: 14px 35px;
    background-color: #65B040;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ap2-popup-button:hover {
    background-color: #5a9e39;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 600px) {
    .ap2-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ap2-form-group-half {
        width: 100%;
    }
    
    .ap2-popup-content {
        padding: 30px 20px;
    }
    
    .ap2-popup-title {
        font-size: 20px;
    }
    
    .ap2-popup-text {
        font-size: 14px;
    }
    
    .ap2-popup-button {
        width: 100%;
        box-sizing: border-box;
    }
}
