/**
 * Newsletter Popup Styles
 */

.newsletter-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.newsletter-popup.active {
  opacity: 1;
  visibility: visible;
}

.newsletter-popup-content {
  background-color: white;
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 90%;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(30px);
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.newsletter-popup.active .newsletter-popup-content {
  transform: translateY(0);
}

.newsletter-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-medium);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.newsletter-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
}

.newsletter-title {
  color: var(--color-berry-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.newsletter-description {
  color: var(--text-medium);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.newsletter-form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.newsletter-form-group.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.newsletter-form-group.checkbox input {
  margin-top: 0.3rem;
}

.newsletter-form-group.checkbox label {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.newsletter-input {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid #e0e0f0;
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #fbfbfe;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-berry-primary);
  box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.1);
  background-color: #ffffff;
}

.newsletter-form-footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.newsletter-submit {
  padding: 0.8rem 2.5rem;
  border-radius: var(--border-radius-md);
  background: linear-gradient(135deg, var(--color-berry-primary), var(--color-berry-secondary));
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(142, 45, 226, 0.3);
}

.newsletter-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(142, 45, 226, 0.4);
}

/* Success state styling */
.newsletter-form-container,
.newsletter-success {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.newsletter-form-container.active,
.newsletter-success.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.success-icon svg circle {
  stroke: var(--color-berry-primary);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  fill: none;
  animation: success-circle 2s forwards cubic-bezier(0.65, 0, 0.45, 1);
}

.success-icon svg path {
  stroke: var(--color-berry-primary);
  stroke-width: 3;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  fill: none;
  transform-origin: 50% 50%;
  animation: success-check 0.8s 0.8s forwards cubic-bezier(0.65, 0, 0.45, 1);
}

@keyframes success-circle {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes success-check {
  100% {
    stroke-dashoffset: 0;
  }
}

.success-title {
  color: var(--color-berry-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.success-description {
  color: var(--text-medium);
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.5;
}

#newsletter-success-close {
  display: block;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  border: 2px solid var(--color-berry-primary);
  background: transparent;
  color: var(--color-berry-primary);
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

#newsletter-success-close:hover {
  background-color: var(--color-berry-primary);
  color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
  .newsletter-popup-content {
    padding: 2rem 1.5rem;
  }
  
  .newsletter-title {
    font-size: 1.5rem;
  }
}
