/**
 * Newsletter Extension - Public CSS
 */

.clubigo-newsletter-field input, .clubigo-newsletter-field textarea, .clubigo-newsletter-field select {
    box-sizing: border-box;
}

/* Newsletter Form */
.clubigo-newsletter-form-wrapper {
    margin: 20px 0;
}

.clubigo-newsletter-form-header {
    margin-bottom: 20px;
    text-align: center;
}

.clubigo-newsletter-form-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.clubigo-newsletter-form-description {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.clubigo-newsletter-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.clubigo-newsletter-form-fields {
    margin-bottom: 15px;
}

.clubigo-newsletter-field {
    margin-bottom: 12px;
}

.clubigo-newsletter-field input,
.clubigo-newsletter-field textarea,
.clubigo-newsletter-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
}

.clubigo-newsletter-field input:focus,
.clubigo-newsletter-field textarea:focus,
.clubigo-newsletter-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.clubigo-newsletter-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.clubigo-newsletter-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.clubigo-newsletter-submit-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s ease;
}

.clubigo-newsletter-submit-btn:hover:not(:disabled) {
    background: #005a87;
}

.clubigo-newsletter-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.clubigo-newsletter-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
}

.clubigo-newsletter-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.clubigo-newsletter-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Floating Button */
.clubigo-newsletter-floating-btn {
    position: fixed;
    z-index: 9999;
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-family: inherit;
}

.clubigo-newsletter-floating-btn[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.clubigo-newsletter-floating-btn[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.clubigo-newsletter-floating-btn[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.clubigo-newsletter-floating-btn[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

.clubigo-newsletter-floating-btn:hover {
    background: #005a87;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Popup Modal Styles */
.clubigo-newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: clubigo-newsletter-fade-in 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.clubigo-newsletter-popup {
    position: relative;
    max-width: 65vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: clubigo-newsletter-slide-in 0.3s ease;
    direction: rtl;
    display: flex;
    background: white;
    border-radius: 12px;
}

.clubigo-newsletter-popup-image {
    flex: 0 0 40%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.clubigo-newsletter-popup-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

.clubigo-newsletter-popup-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

.clubigo-newsletter-popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.clubigo-newsletter-popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.clubigo-newsletter-popup-form {
    width: 100%;
}

/* Animations */
@keyframes clubigo-newsletter-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes clubigo-newsletter-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .clubigo-newsletter-popup {
        width: 95vw;
        max-height: 95vh;
        flex-direction: column;
    }

    .clubigo-newsletter-popup-image {
        display: none;
    }

    .clubigo-newsletter-popup-content {
        padding: 20px;
    }
}