/* Subscription Form Frontend Styles */

.dropemsu-form-wrapper {
  max-width: 500px;
  margin: 30px auto;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dropemsu-form h3 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.dropemsu-form .form-group {
  margin-bottom: 20px;
}

.dropemsu-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.dropemsu-form input[type="email"],
.dropemsu-form input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.dropemsu-form input[type="email"]:focus,
.dropemsu-form input[type="text"]:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.dropemsu-form input::placeholder {
  color: #999;
}

.dropemsu-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: #2271b1;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropemsu-submit-btn:hover {
  background: #135e96;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.dropemsu-submit-btn:active {
  transform: translateY(0);
}

.dropemsu-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.dropemsu-messages {
  margin-bottom: 20px;
  padding: 12px 15px;
  padding-right: 40px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
  position: relative;
}

.dropemsu-messages.show {
  display: block;
}

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

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

.dropemsu-messages.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Message Close Button */
.dropemsu-message-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.dropemsu-message-close:hover {
  opacity: 1;
}

.dropemsu-message-close:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  opacity: 1;
}

.dropemsu-messages.success .dropemsu-message-close {
  color: #155724;
}

.dropemsu-messages.error .dropemsu-message-close {
  color: #721c24;
}

.dropemsu-messages.info .dropemsu-message-close {
  color: #0c5460;
}

.dropemsu-message-content {
  display: block;
  padding-right: 10px;
}

/* Loading State */
.dropemsu-form.loading {
  position: relative;
  pointer-events: none;
}

.dropemsu-form.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2271b1;
  border-radius: 50%;
  animation: dropemsu-spin 1s linear infinite;
}

@keyframes dropemsu-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* reCAPTCHA Container */
.dropemsu-form .g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 600px) {
  .dropemsu-form-wrapper {
    margin: 20px 10px;
    padding: 20px;
  }

  .dropemsu-form h3 {
    font-size: 20px;
  }

  .dropemsu-form input[type="email"],
  .dropemsu-form input[type="text"] {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Alternative compact style */
.dropemsu-form-wrapper.compact {
  max-width: 400px;
  padding: 20px;
}

.dropemsu-form-wrapper.compact h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

.dropemsu-form-wrapper.compact .form-group {
  margin-bottom: 15px;
}

/* Inline style for minimal footprint */
.dropemsu-form-wrapper.inline {
  max-width: 100%;
  border: none;
  box-shadow: none;
  padding: 0;
}

.dropemsu-form-wrapper.inline .dropemsu-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.dropemsu-form-wrapper.inline .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.dropemsu-form-wrapper.inline .dropemsu-submit-btn {
  flex-shrink: 0;
  width: auto;
  padding: 12px 30px;
}

@media (max-width: 768px) {
  .dropemsu-form-wrapper.inline .dropemsu-form {
    flex-direction: column;
  }

  .dropemsu-form-wrapper.inline .form-group {
    width: 100%;
  }

  .dropemsu-form-wrapper.inline .dropemsu-submit-btn {
    width: 100%;
  }
}

/* Confirmation Status Shortcode Styles */
.dropemsu-confirmation-status {
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  border: 2px solid;
}

.dropemsu-confirmation-status p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.dropemsu-confirmation-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.dropemsu-confirmation-error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .dropemsu-form-wrapper {
    background: #1e1e1e;
    border-color: #3a3a3a;
  }

  .dropemsu-form h3 {
    color: #e0e0e0;
  }

  .dropemsu-form label {
    color: #b0b0b0;
  }

  .dropemsu-form input[type="email"],
  .dropemsu-form input[type="text"] {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #e0e0e0;
  }

  .dropemsu-form input::placeholder {
    color: #666;
  }
}
