/* TraPay Newsletter Subscription Component Styles */

/* Newsletter Form - Main Container */
#newsletter-subscription {
    width: 100%;
}

.newsletter-subscription-wrapper {
    position: relative;
}

.newsletter-form {
    width: 100%;
}

/* Newsletter Input Group */
.newsletter-input-group {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
}

.newsletter-input-group .input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.newsletter-input-group .input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-icon {
    position: absolute;
    right: 1rem;
    color: #9ca3af;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

.newsletter-email-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    background: transparent;
    outline: none;
    font-weight: 500;
    color: #374151;
    margin: 3px !important;
}

.newsletter-email-input::placeholder {
    color: #9ca3af;
}

/* Newsletter Submit Button - با استایل قوی */
#newsletter-submit-btn,
button.newsletter-submit-btn,
.newsletter-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 1rem 1.75rem !important;
    background: linear-gradient(135deg, #0d3e7e 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(13, 62, 126, 0.25) !important;
}

.footer-newsletter-compact #newsletter-submit-btn:hover,
.footer-newsletter-compact button.newsletter-submit-btn:hover,
.footer-newsletter-compact .newsletter-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(13, 62, 126, 0.35) !important;
    background: linear-gradient(135deg, #0d3e7e 0%, #2563eb 100%) !important;
}

.footer-newsletter-compact #newsletter-submit-btn:active,
.footer-newsletter-compact button.newsletter-submit-btn:active,
.footer-newsletter-compact .newsletter-submit-btn:active {
    transform: translateY(0) !important;
}

.footer-newsletter-compact .newsletter-submit-btn .btn-text {
    display: inline-block !important;
}

.footer-newsletter-compact .newsletter-submit-btn .btn-icon {
    font-size: 1.125rem !important;
    transition: transform 0.3s ease !important;
    display: inline-block !important;
}

.footer-newsletter-compact .newsletter-submit-btn:hover .btn-icon {
    transform: translateX(-3px) !important;
}

/* Modal Styles */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.newsletter-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.newsletter-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0d3e7e 0%, #3b82f6 100%);
    color: white;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-title i {
    font-size: 1.5rem;
}

.modal-close-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Modal Body */
.footer-newsletter-compact .modal-body {
    padding: 2rem;
}

.footer-newsletter-compact .modal-description {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* CAPTCHA Section */
.footer-newsletter-compact .captcha-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-newsletter-compact .captcha-display {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.footer-newsletter-compact .captcha-display:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.footer-newsletter-compact .captcha-display img {
    display: block;
    border-radius: 6px;
    cursor: pointer;
}

.footer-newsletter-compact .captcha-refresh-btn {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.footer-newsletter-compact .captcha-refresh-btn:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #0d3e7e;
    transform: scale(1.05);
}

.footer-newsletter-compact .captcha-refresh-btn:active {
    transform: scale(0.95);
}

.footer-newsletter-compact .captcha-refresh-btn .refresh-icon {
    font-size: 1.5rem;
}

.footer-newsletter-compact .captcha-refresh-btn .loading-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* CAPTCHA Input */
.footer-newsletter-compact .captcha-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.footer-newsletter-compact .captcha-input-wrapper .input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

.footer-newsletter-compact .captcha-input-wrapper input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.footer-newsletter-compact .captcha-input-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal Actions */
.footer-newsletter-compact .modal-actions {
    display: flex;
    gap: 1rem;
}

.footer-newsletter-compact .btn-cancel,
.footer-newsletter-compact .btn-confirm {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-newsletter-compact .btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.footer-newsletter-compact .btn-cancel:hover {
    background: #e5e7eb;
    color: #374151;
}

.footer-newsletter-compact .btn-confirm {
    background: linear-gradient(135deg, #388e1d 0%, #10b981 100%);
    color: white;
}

.footer-newsletter-compact .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 142, 29, 0.3);
}

.footer-newsletter-compact .btn-confirm:active {
    transform: translateY(0);
}

.footer-newsletter-compact.confirm-icon {
    font-size: 1.125rem;
}

/* Modal Loading State */
.footer-newsletter-compact .modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 20px;
}

.footer-newsletter-compact .loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.footer-newsletter-compact .modal-loading p {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
}

/* Notification */
.newsletter-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-right: 4px solid #388e1d;
}

.newsletter-notification.error .notification-content {
    border-right-color: #8e281d;
}

.notification-icon {
    font-size: 1.5rem;
    color: #388e1d;
}

.newsletter-notification.error .notification-icon {
    color: #8e281d;
}

.notification-message {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .newsletter-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .footer-newsletter-compact .modal-header {
        padding: 1.25rem 1.5rem;
    }

    .footer-newsletter-compact .modal-title {
        font-size: 1.125rem;
    }

    .footer-newsletter-compact .modal-body {
        padding: 1.5rem;
    }

    .footer-newsletter-compact .modal-actions {
        flex-direction: column;
    }

    .newsletter-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
}

/* Compact Footer Variant - استایل ویژه فوتر */
.footer-newsletter-compact .newsletter-input-group {
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.footer-newsletter-compact .input-wrapper {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

.footer-newsletter-compact .input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: #3b82f6 !important;
}

.footer-newsletter-compact .newsletter-icon {
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer-newsletter-compact .newsletter-email-input {
    padding: 0.875rem 2.5rem 0.875rem 1rem !important;
    color: white !important;
    font-size: 0.875rem !important;
}

.footer-newsletter-compact .newsletter-email-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* دکمه فوتر - با استایل قوی و زیبا */
.footer-newsletter-compact #newsletter-submit-btn,
.footer-newsletter-compact button.newsletter-submit-btn,
.footer-newsletter-compact .newsletter-submit-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 0.875rem !important;
    background: linear-gradient(90deg, #3b82f6 0%, #0d3e7e 100%) !important;
    /* box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important; */
}

.footer-newsletter-compact #newsletter-submit-btn:hover,
.footer-newsletter-compact button.newsletter-submit-btn:hover,
.footer-newsletter-compact .newsletter-submit-btn:hover {
    background: linear-gradient(90deg, #0d3e7e 0%, #1e40af 100%) !important;
    box-shadow: 0 8px 25px rgba(13, 62, 126, 0.4) !important;
    transform: translateY(-2px) !important;
}
