/**
 * Newsletter Popup Styles
 */

/* Popup overlay */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Popup container */
.newsletter-popup-container {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.newsletter-popup-overlay.show .newsletter-popup-container {
    transform: scale(1);
}

/* Popup header */
.newsletter-popup-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.newsletter-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}

.newsletter-popup-close:hover {
    color: #333;
}

.newsletter-popup-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.newsletter-popup-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Popup body */
.newsletter-popup-body {
    padding: 20px 30px 30px;
}

/* Loading state */
.newsletter-popup-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.newsletter-popup-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    margin-left: 10px;
    animation: newsletter-spin 1s linear infinite;
}

@keyframes newsletter-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form styling within popup */
.newsletter-popup-body .wpcf7 {
    margin: 0;
}

.newsletter-popup-body .wpcf7-form {
    margin: 0;
}

.newsletter-popup-body .wpcf7-form p {
    margin-bottom: 15px;
}

.newsletter-popup-body .wpcf7-form-control.wpcf7-text {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.newsletter-popup-body .wpcf7-form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.newsletter-popup-body .wpcf7-submit {
    margin-top: 1rem;
    background: #433932;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    width: 100%;
}

.newsletter-popup-body .wpcf7-submit:hover {
    background: #433932;
}

.newsletter-popup-body .wpcf7-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Checkbox styling */
.newsletter-popup-body .wpcf7-checkbox {
    margin: 0 0 0 1rem;
}

.newsletter-popup-body .wpcf7-list-item {
    margin: 8px 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.newsletter-popup-body .wpcf7-list-item-label {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    cursor: pointer;
    display: block;
    position: relative;
}

.newsletter-popup-body .wpcf7-list-item input[type="checkbox"] {
    margin-top: 2px;
}

/* Response messages */
.newsletter-popup-body .wpcf7-response-output {
    margin: 15px 0 0 0;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.newsletter-popup-body .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.newsletter-popup-body .wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Trigger link styling - Base */
.newsletter-popup-inline {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

/* Inline type - link do wstawienia w tekst (DEFAULT) */
.newsletter-popup-link {
    color: #fff;
    text-decoration: underline;
    padding: 0;
    background: none;
    border: none;
    font-size: inherit;
    font-weight: inherit;
}

.newsletter-popup-link:hover {
    color: #fff;
    text-decoration: none;
}

/* Button type - przycisk z paddingiem i tłem */
.newsletter-popup-button {
    background: #fff;
    color: #433932;
    border: 2px solid #433932;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.newsletter-popup-button:hover {
    background: #433932;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(67, 57, 50, 0.2);
    transform: translateY(-1px);
}

.newsletter-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .newsletter-popup-container {
        width: 95%;
        margin: 20px;
    }
    
    .newsletter-popup-header,
    .newsletter-popup-body {
        padding: 20px;
    }
    
    .newsletter-popup-title {
        font-size: 20px;
    }
    
    .newsletter-popup-description {
        font-size: 14px;
    }
    
    /* Button responsive na mobile */
    .newsletter-popup-button {
        padding: 10px 20px;
        font-size: 13px;
        letter-spacing: 0.3px;
    }
}

/* Animation for success */
.newsletter-popup-success {
    text-align: center;
    padding: 40px 20px;
}

.newsletter-popup-success h3 {
    color: #28a745;
    margin-bottom: 10px;
}

.newsletter-popup-success p {
    color: #666;
    margin: 0;
} 