/* M Media Newsletter - Frontend Styles */

.mmedia-dispatch-form {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.mmedia-dispatch-title {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.mmedia-dispatch-description {
  margin: 0 0 15px 0;
  color: #555;
  font-size: 14px;
}

.mmedia-dispatch-signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mmedia-dispatch-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.mmedia-dispatch-input:focus {
  outline: none;
  border-color: #2271b1;
}

.mmedia-dispatch-submit {
  padding: 12px 24px;
  background: #2271b1;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.mmedia-dispatch-submit:hover {
  background: #135e96;
}

.mmedia-dispatch-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mmedia-dispatch-message {
  padding: 12px;
  border-radius: 4px;
  margin-top: 10px;
}

.mmedia-dispatch-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.mmedia-dispatch-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Inline Style */
.mmedia-dispatch-style-inline .mmedia-dispatch-signup-form {
  flex-direction: row;
  flex-wrap: wrap;
}

.mmedia-dispatch-style-inline .mmedia-dispatch-input {
  flex: 1;
  min-width: 200px;
}

.mmedia-dispatch-style-inline .mmedia-dispatch-submit {
  flex-shrink: 0;
}

/* Minimal Style */
.mmedia-dispatch-style-minimal {
  background: transparent;
  border: none;
  padding: 0;
}

/* Sidebar Style (uses existing theme styles if present) */
.sidebar-widget .mmedia-dispatch-form,
.newsletter-widget .mmedia-dispatch-form {
  background: #d4af37;
  border: none;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.sidebar-widget .mmedia-dispatch-title,
.newsletter-widget .mmedia-dispatch-title {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.sidebar-widget .mmedia-dispatch-description,
.newsletter-widget .mmedia-dispatch-description {
  margin: 0 0 20px 0;
  color: #1a1a1a;
  font-size: 14px;
  line-height: 1.5;
}

.sidebar-widget .mmedia-dispatch-input,
.newsletter-widget .mmedia-dispatch-input {
  width: 100%;
  padding: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  color: #333;
  box-sizing: border-box;
  transition: all 0.2s;
}

.sidebar-widget .mmedia-dispatch-input:focus,
.newsletter-widget .mmedia-dispatch-input:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.sidebar-widget .mmedia-dispatch-submit,
.newsletter-widget .mmedia-dispatch-submit {
  width: 100%;
  padding: 14px 24px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-widget .mmedia-dispatch-submit:hover,
.newsletter-widget .mmedia-dispatch-submit:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar-widget .mmedia-dispatch-submit:disabled,
.newsletter-widget .mmedia-dispatch-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   POPUP MODAL STYLES
   ============================================ */

.mmedia-dispatch-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
}

.mmedia-dispatch-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.mmedia-dispatch-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* background color set via inline style from settings */
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 550px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  z-index: 1000000;
}

.mmedia-dispatch-popup-products {
  display: flex;
  gap: 0;
  height: 120px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.mmedia-dispatch-popup-product {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.mmedia-dispatch-popup-product img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.mmedia-dispatch-popup-product:hover img {
  transform: scale(1.05);
}

.mmedia-dispatch-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  /* Color is set via inline style from theme settings */
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  z-index: 10;
}

.mmedia-dispatch-popup-close:hover {
  opacity: 1;
}

.mmedia-dispatch-popup-body {
  padding: 40px 35px 35px;
}

.mmedia-dispatch-popup-body h3 {
  margin: 0 0 12px 0;
  font-size: 28px;
  font-weight: 700;
  /* color set via inline style from settings */
  line-height: 1.2;
}

.mmedia-dispatch-popup-body p {
  margin: 0 0 24px 0;
  /* color and opacity set via inline style from settings */
  font-size: 15px;
  line-height: 1.5;
}

.mmedia-dispatch-popup-form {
  background: transparent;
  border: none;
  padding: 0;
}

.mmedia-dispatch-popup-form .mmedia-dispatch-form-group {
  margin-bottom: 15px;
}

.mmedia-dispatch-popup-form input[type="email"] {
  width: 100%;
  padding: 15px 18px;
  border: 2px solid rgba(128, 128, 128, 0.2);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.2s;
  /* background and color set via inline style from settings */
}

.mmedia-dispatch-popup-form input[type="email"]::placeholder {
  opacity: 0.6;
}

.mmedia-dispatch-popup-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(128, 128, 128, 0.4);
  opacity: 1;
}

.mmedia-dispatch-popup-form button[type="submit"] {
  width: 100%;
  padding: 15px 24px;
  /* background and color set via inline style from settings */
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mmedia-dispatch-popup-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mmedia-dispatch-popup-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .mmedia-dispatch-popup-content {
    width: 95%;
    border-radius: 8px;
  }

  .mmedia-dispatch-popup-body {
    padding: 30px 20px 20px;
  }

  .mmedia-dispatch-popup-body h3 {
    font-size: 22px;
  }

  .mmedia-dispatch-popup-body p {
    font-size: 14px;
  }

  .mmedia-dispatch-popup-close {
    top: 10px;
    right: 10px;
    font-size: 28px;
  }
}
