/**
 * @file
 * Styles for custom newsletter module.
 */

/* Убираем градиент и добавляем фоновое изображение к правильному элементу */
.newsletter {
  background-image: url('newsletter-bg.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #333333 !important; /* Темный фон как запасной вариант */
  background: url('newsletter-bg.jpg') center/cover no-repeat !important;
  position: relative;
}

.newsletter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Темное перекрытие */
  z-index: 1;
}

.newsletter > * {
  position: relative;
  z-index: 2;
}

.custom-newsletter-block {
  position: relative;
  padding: 60px 20px 80px 20px;
  margin: 20px 0;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}


.custom-newsletter-block__content {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.newsletter-block-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: #333333;
}

.newsletter-logo-image {
  max-width: 200px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(1.2) contrast(1.1);
}

.newsletter-block__title {
  color: #ffffff !important;
  font-size: 3.75rem !important;
  line-height: 1 !important;
  margin-bottom: 40px !important;
  font-weight: 700 !important;
  display: block !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.newsletter-block__subtitle {
  color: #ffffff !important;
  font-size: 1.4em !important;
  margin-bottom: 60px !important;
  line-height: 1.5 !important;
  display: block !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.newsletter-block__form {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
  width: 100%;
}

.newsletter-form-container {
  display: flex !important;
  gap: 4px;
  align-items: center;
  width: 100%;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-form-container .form-item {
  flex: 2;
  margin: 0 !important;
}

.newsletter-form-container .form-item.mb-4 {
  margin-bottom: 0 !important;
}

.newsletter-form-container .form-actions {
  margin: 0 !important;
  flex: 1;
}

.custom-newsletter-block input[type="email"],
.custom-newsletter-block .form-input,
.custom-newsletter-block input {
  width: 100% !important;
  min-width: 450px !important;
  max-width: 450px !important;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  font-size: 16px;
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.custom-newsletter-block input[type="email"]::placeholder,
.custom-newsletter-block .form-input::placeholder,
.custom-newsletter-block input::placeholder {
  color: rgba(255, 255, 255, 0.8) !important;
  opacity: 1;
}

.custom-newsletter-block input[type="email"]:focus,
.custom-newsletter-block .form-input:focus,
.custom-newsletter-block input:focus {
  border-color: rgba(255, 255, 255, 0.8) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  background-color: #ffffff !important;
  color: #333333 !important;
  transform: translateY(-2px);
}

.custom-newsletter-block .btn,
.custom-newsletter-block input[type="submit"],
.custom-newsletter-block button {
  padding: 12px 16px;
  background-color: #8A3E52;
  border: 1px solid #8A3E52;
  color: #ffffff;
  border-radius: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  min-width: 150px !important;
  max-width: 150px !important;
  width: 150px !important;
  backdrop-filter: blur(10px);
  height: 100%;
}

.custom-newsletter-block .btn:hover,
.custom-newsletter-block input[type="submit"]:hover,
.custom-newsletter-block button:hover {
  background-color: #CBA135;
  border-color: #CBA135;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.custom-newsletter-block .btn:focus,
.custom-newsletter-block input[type="submit"]:focus,
.custom-newsletter-block button:focus {
  background-color: #CBA135;
  border-color: #CBA135;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(203, 161, 53, 0.3);
}

.custom-newsletter-block .btn:active,
.custom-newsletter-block input[type="submit"]:active,
.custom-newsletter-block button:active {
  background-color: #CBA135;
  border-color: #CBA135;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive styles for tablets and mobile devices */

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
  .newsletter-block__title {
    font-size: 2.5em !important;
    margin-bottom: 30px !important;
  }
  
  .newsletter-block__subtitle {
    font-size: 1.2em !important;
    margin-bottom: 50px !important;
  }
  
  .custom-newsletter-block__content {
    max-width: 500px;
  }
  
  .newsletter-form-container {
    max-width: 500px;
  }
  
  .custom-newsletter-block input[type="email"],
  .custom-newsletter-block .form-input,
  .custom-newsletter-block input {
    min-width: 350px !important;
    max-width: 350px !important;
  }
  
  .custom-newsletter-block .btn,
  .custom-newsletter-block input[type="submit"],
  .custom-newsletter-block button {
    min-width: 120px !important;
    max-width: 120px !important;
    width: 120px !important;
  }
}

/* Mobile styles (320px - 768px) */
@media (max-width: 768px) {
  .newsletter-block__title {
    font-size: 2em !important;
    margin-bottom: 25px !important;
  }
  
  .newsletter-block__subtitle {
    font-size: 1.1em !important;
    margin-bottom: 40px !important;
  }
  
  .custom-newsletter-block {
    padding: 40px 15px 60px 15px;
    min-height: 400px;
  }
  
  .custom-newsletter-block__content {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .newsletter-form-container {
    flex-direction: column !important;
    gap: 15px !important;
    max-width: 100%;
  }
  
  .custom-newsletter-block input[type="email"],
  .custom-newsletter-block .form-input,
  .custom-newsletter-block input {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0;
  }
  
  .custom-newsletter-block .btn,
  .custom-newsletter-block input[type="submit"],
  .custom-newsletter-block button {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  
  .newsletter-block__form {
    margin: 0 auto 40px auto;
  }
}

/* Small mobile styles (320px - 480px) */
@media (max-width: 480px) {
  .newsletter-block__title {
    font-size: 1.8em !important;
    margin-bottom: 20px !important;
  }
  
  .newsletter-block__subtitle {
    font-size: 1em !important;
    margin-bottom: 30px !important;
  }
  
  .custom-newsletter-block {
    padding: 30px 10px 50px 10px;
    min-height: 350px;
  }
  
  .custom-newsletter-block__content {
    padding: 0 5px;
  }
  
  .newsletter-form-container {
    gap: 12px !important;
  }
  
  .newsletter-block__form {
    margin: 0 auto 30px auto;
  }
}

/* Admin page styles */
.custom-newsletter-admin-page {
  margin: 20px 0;
}

.newsletter-admin__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.newsletter-admin__header h1 {
  margin: 0;
  color: #333;
}

.newsletter-admin__actions {
  display: flex;
  gap: 10px;
}

.newsletter-admin__filters {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.newsletter-admin__filters .form-item {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 0;
}

.newsletter-admin__filters label {
  font-weight: 500;
  margin-right: 5px;
}

.newsletter-admin__filters select {
  padding: 5px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.newsletter-admin__content {
  background: white;
  overflow: hidden;
}

.newsletter-admin__content table {
  width: 100%;
  margin: 0;
}

.newsletter-admin__content th {
  background: #f8f9fa;
  font-weight: 600;
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

.newsletter-admin__content td {
  padding: 12px;
  border-bottom: 1px solid #f1f3f4;
}

.newsletter-admin__content tr:hover {
  background: #f8f9fa;
}

/* Responsive design */
@media (max-width: 768px) {
  .custom-newsletter-block {
    padding: 40px 15px;
  }
  
  .newsletter-block__title {
    font-size: 1.8em;
    letter-spacing: 1px;
  }
  
  .newsletter-block__subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }
  
  .newsletter-block__form {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  
  .newsletter-block__form input[type="email"] {
    min-width: auto;
    width: 100%;
  }
  
  .newsletter-admin__header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .newsletter-admin__filters .form-item {
    display: block;
    margin-bottom: 10px;
  }
}
