/* Simple Photo Newsletter Styles */

.spn-newsletter-form-container {
  max-width: 600px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.spn-full-width {
  max-width: 100%;
  padding: 0;
}

.spn-newsletter-form {
  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.spn-newsletter-form:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Classic Style */
.spn-style-classic {
  background: #fff
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f9f9f9"/><path d="M0 0L100 100M100 0L0 100" stroke="%23f0f0f0" stroke-width="1"/></svg>')
    repeat;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 3.5rem 2.5rem;
}

.spn-style-classic .spn-form-heading {
  font-family: "Georgia", serif;
  letter-spacing: -0.5px;
}

.spn-style-classic .spn-form-title {
  font-family: "Georgia", serif;
}

.spn-style-classic .spn-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.2), transparent);
  margin: 1.5rem auto;
  width: 80%;
}

.spn-style-classic .spn-submit-button {
  background: #333;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.spn-style-classic .spn-submit-button:hover {
  background: #000;
}

.spn-form-subtitle {
  display: block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.spn-form-heading {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.spn-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.spn-divider {
  height: 2px;
  background: rgba(0, 0, 0, 0.05);
  margin: 1rem auto;
  width: 60%;
}

.spn-form-description {
  color: #6c757d;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.spn-subscriber-count {
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 1.5rem 0;
}

.spn-subscription-form {
  margin: 1.5rem 0;
}

.spn-form-group {
  display: flex;
  gap: 0.5rem;
  margin: 0 auto;
  max-width: 90%;
}

.spn-email-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
}

.spn-email-input:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

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

/* Email validation and button states */
.spn-submit-button {
  padding: 0.875rem 1.75rem;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}

.spn-submit-button.enabled {
  opacity: 1;
  pointer-events: auto;
}

.spn-submit-button.enabled:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
}

.spn-submit-button.validated {
  background: #28a745;
  color: #ffffff;
  border-color: #28a745;
}

.spn-submit-button.submitting {
  background: #007cba;
  color: #ffffff;
  border-color: #007cba;
}

.spn-submit-button:active {
  transform: translateY(0);
}

.spn-submit-button:disabled {
  background: #9ca3af;
  color: #ffffff;
  border-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  opacity: 0.7;
}

/* Checkmark animation */
.spn-checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  position: relative;
}

.spn-checkmark-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #28a745;
  position: relative;
  animation: checkmark-scale 0.3s ease-in-out;
}

.spn-checkmark-check {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
  animation: checkmark-draw 0.3s ease-in-out 0.1s both;
}

@keyframes checkmark-scale {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes checkmark-draw {
  0% {
    height: 0;
  }
  100% {
    height: 10px;
  }
}

/* Email input validation states */
.spn-email-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
}

.spn-email-input.valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.spn-email-input.invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.spn-email-input:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.spn-email-input:focus.valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.spn-email-input:focus.invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Classic style overrides */
.spn-style-classic .spn-submit-button {
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  background: #ffffff;
  color: #333333;
  border-color: #333333;
}

.spn-style-classic .spn-submit-button.enabled:hover {
  background: #333333;
  color: #ffffff;
}

.spn-style-classic .spn-submit-button.validated {
  background: #28a745;
  border-color: #28a745;
}

.spn-style-classic .spn-submit-button.submitting {
  background: #333333;
  border-color: #333333;
}

.spn-message {
  padding: 1rem;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 1rem;
}

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

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

.spn-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

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

/* Full-width styles */
.spn-full-width .spn-newsletter-form {
  border-radius: 0;
  margin: 0;
  padding: 4rem 2rem;
}

.spn-full-width.spn-style-classic .spn-newsletter-form {
  border-left: none;
  border-right: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .spn-form-heading {
    font-size: 1.8rem;
  }

  .spn-form-description {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .spn-newsletter-form {
    padding: 2.5rem 1.5rem;
  }

  .spn-form-heading {
    font-size: 1.6rem;
  }

  .spn-form-title {
    font-size: 1.3rem;
  }

  .spn-form-description {
    font-size: 1rem;
    max-width: 100%;
  }

  .spn-form-group {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .spn-newsletter-form {
    padding: 2rem 1rem;
  }

  .spn-form-heading {
    font-size: 1.4rem;
  }

  .spn-form-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .spn-email-input,
  .spn-submit-button {
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .spn-form-subtitle {
    font-size: 0.75rem;
  }

  .spn-form-heading {
    font-size: 1.3rem;
  }

  .spn-form-title {
    font-size: 1.1rem;
  }

  .spn-form-description {
    font-size: 0.9rem;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .spn-newsletter-form {
    background: #1a1a1a;
    border-color: #333;
    color: #ffffff;
  }

  .spn-style-classic {
    background: #1a1a1a
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23222222"/><path d="M0 0L100 100M100 0L0 100" stroke="%23282828" stroke-width="1"/></svg>')
      repeat;
    border-color: #333;
  }

  .spn-style-classic .spn-divider {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  }

  .spn-form-heading,
  .spn-form-title {
    color: #ffffff;
  }

  .spn-form-subtitle {
    color: #aaaaaa;
  }

  .spn-form-description {
    color: #b3b3b3;
  }

  .spn-divider {
    background: rgba(255, 255, 255, 0.1);
  }

  .spn-email-input {
    background: #2a2a2a;
    border-color: #444;
    color: #ffffff;
  }

  .spn-email-input::placeholder {
    color: #666;
  }

  .spn-email-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
  }

  .spn-style-classic .spn-submit-button {
    background: #555;
  }

  .spn-style-classic .spn-submit-button:hover {
    background: #777;
  }
}
