/** * Newsletter Popup SCSS Styles * * Modern, responsive styling for the newsletter signup popup * All styles are scoped to prevent conflicts with existing theme styles */ // SCSS Variables $popup-main-color: rgb(0, 91, 151); // Main color for title and button $popup-text-color: rgb(36, 28, 21); // Text color for description and bottom text $popup-white: #ffffff; $popup-black: #000000; $popup-gray-50: #f9fafb; $popup-gray-100: #f3f4f6; $popup-gray-200: #e5e7eb; $popup-gray-300: #d1d5db; $popup-gray-400: #9ca3af; $popup-gray-500: #6b7280; $popup-gray-600: #4b5563; $popup-gray-700: #374151; $popup-gray-800: #1f2937; $popup-gray-900: #111827; $popup-success: #10b981; $popup-error: #ef4444; $popup-border-radius: 16px; $popup-border-radius-small: 12px; $popup-border-radius-tiny: 4px; $popup-transition: all 0.2s ease; $popup-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); $popup-z-index: 999999; // Animation keyframes @keyframes newsletter-popup-fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes newsletter-popup-slideUp { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes newsletter-popup-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } // Main popup scope - everything is nested under this .newsletter-popup-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); z-index: $popup-z-index; display: flex; align-items: center; justify-content: center; padding: 20px; animation: newsletter-popup-fadeIn 0.3s ease-out; // Container .newsletter-popup-container { background: $popup-white; border-radius: $popup-border-radius; box-shadow: $popup-shadow; max-width: 600px; width: 100%; max-height: 50vh; position: relative; animation: newsletter-popup-slideUp 0.3s ease-out; display: flex; overflow: hidden; } // Content .newsletter-popup-content { padding: 40px 30px 30px; position: relative; background: $popup-white; color: $popup-text-color; flex-basis: 58%; } // Close button .newsletter-popup-close { position: absolute; top: 10px; right: 10px; background: none; border: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; color: $popup-gray-500; transition: $popup-transition; z-index: 10; &:hover { background: $popup-gray-100; color: $popup-gray-700; transform: scale(1.05); } svg { width: 20px; height: 20px; } } // Header .newsletter-popup-header { text-align: center; margin-bottom: 30px; } .newsletter-popup-title { font-size: 28px; font-weight: 700; color: $popup-main-color; // Same color as button background margin: 0 0 12px 0; line-height: 1.2; } .newsletter-popup-description { font-size: 16px; color: $popup-text-color; margin: 0; line-height: 1.5; } // Form .newsletter-popup-form { margin-bottom: 20px; .newsletter-popup-input-wrapper { display: flex; gap: 12px; margin-bottom: 20px; flex-direction: column; // Stack vertically for better layout } #np_email { width: 100%; padding: 14px 16px; border: 1px solid $popup-gray-300; border-radius: $popup-border-radius-small; font-size: 16px; color: $popup-text-color; background: $popup-white; transition: $popup-transition; font-family: inherit; box-sizing: border-box; &:focus { outline: none; border-color: $popup-main-color; box-shadow: 0 0 0 3px rgba($popup-main-color, 0.1); background: $popup-white; // Ensure white background on focus } &::placeholder { color: $popup-gray-400; } } .newsletter-popup-submit { width: 100%; padding: 14px 24px; background: $popup-main-color; // Same color as title color: $popup-white; border: none; border-radius: $popup-border-radius-small; font-size: 16px; font-weight: 600; cursor: pointer; transition: $popup-transition; display: flex; align-items: center; justify-content: center; font-family: inherit; box-sizing: border-box; &:hover { transform: translateY(-1px); background: rgba($popup-main-color, 0.9); box-shadow: 0 10px 25px -5px rgba($popup-main-color, 0.3); } &:active { transform: translateY(0); } &:disabled { opacity: 0.6; cursor: not-allowed; transform: none; } } } // Footer .newsletter-popup-footer { text-align: center; padding-top: 20px; border-top: 1px solid $popup-gray-100; p { margin: 0; font-size: 13px; color: $popup-text-color; font-style: italic; } } // Success and Error Messages .newsletter-popup-success, .newsletter-popup-error { text-align: center; padding: 20px; .success-icon, .error-icon { margin: 0 auto 16px; width: 48px; height: 48px; } h3 { font-size: 22px; font-weight: 600; margin: 0 0 8px 0; } p { font-size: 14px; color: $popup-text-color; margin: 0; line-height: 1.5; } } .newsletter-popup-success h3 { color: $popup-success; } .newsletter-popup-error h3 { color: $popup-error; } // Loading spinner (inserted via JavaScript) .loading-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba($popup-white, 0.4); border-top: 2px solid $popup-white; border-radius: 50%; animation: newsletter-popup-spin 1s linear infinite; margin-right: 5px; } // Mobile responsiveness @media (max-width: 640px) { padding: 15px; .newsletter-popup-container { flex-direction: column; // Stack content and image vertically on mobile max-height: 80vh; // Allow more height on mobile } .newsletter-popup-content { padding: 30px 20px 20px; flex-basis: auto; // Reset flex-basis on mobile } .newsletter-popup-image-container { flex-basis: auto; // Reset flex-basis on mobile max-height: 200px; // Limit image height on mobile } .newsletter-popup-title { font-size: 24px; } .newsletter-popup-description { font-size: 14px; } .newsletter-popup-form { .newsletter-popup-input-wrapper { gap: 15px; // Increase gap on mobile } #np_email { width: 100%; box-sizing: border-box; } .newsletter-popup-submit { width: 100%; } } } @media (max-width: 480px) { .newsletter-popup-content { padding: 25px 15px 15px; } .newsletter-popup-title { font-size: 22px; } .newsletter-popup-form { #np_email, .newsletter-popup-submit { padding: 12px 14px; font-size: 15px; } } .newsletter-popup-image-container { max-height: 150px; // Even smaller image on very small screens } } // Print styles (hide popup when printing) @media print { display: none !important; } .newsletter-popup-image-container{ flex-basis: 42%; .newsletter-popup-image{ width: 100%; height: 100%; max-height: 100%; object-fit: cover; object-position: center; } } } // Body scroll lock when popup is open (outside main scope for specificity) body.newsletter-popup-open { overflow: hidden; }