/**
 * Contact Support Modal/Popup
 * Responsive design matching Unitronics style
 */

.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

.contact-modal--active {
  display: flex !important;
  pointer-events: auto;
}

.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-modal--active .contact-modal__overlay {
  opacity: 1;
}

.contact-modal__container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.contact-modal--active .contact-modal__container {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.contact-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.contact-modal__close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.contact-modal__close svg {
  width: 20px;
  height: 20px;
  color: #333;
}

.contact-modal__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

@media (max-width: 768px) {
  .contact-modal__content {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .contact-modal__content {
    /* Swap order: form on left, image on right */
    direction: ltr;
  }
}

/* Form Section */
.contact-modal__form-section {
  padding: 60px 50px 40px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .contact-modal__form-section {
    padding: 50px 30px 30px;
  }
}

.contact-modal__title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .contact-modal__title {
    font-size: 26px;
  }
}

.contact-modal__subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 32px 0;
}

@media (max-width: 768px) {
  .contact-modal__subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }
}

.contact-modal__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-modal__label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.contact-modal__input,
.contact-modal__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #111827;
  transition: all 0.2s;
  background: #f9fafb;
}

.contact-modal__input:focus,
.contact-modal__textarea:focus {
  outline: none;
  border-color: #E31E24;
  background: white;
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.contact-modal__input::placeholder,
.contact-modal__textarea::placeholder {
  color: #9ca3af;
}

.contact-modal__textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-modal__submit {
  width: 100%;
  padding: 14px 24px;
  background: #E31E24;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.contact-modal__submit:hover:not(:disabled) {
  background: #c71a20;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

.contact-modal__submit:active:not(:disabled) {
  transform: translateY(0);
}

.contact-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-modal__copyright {
  margin-top: auto;
  padding-top: 24px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* Image Section */
.contact-modal__image-section {
  position: relative;
  background: linear-gradient(135deg, #1A2332 0%, #2D1F3D 50%, #8B1538 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .contact-modal__image-section {
    display: none;
  }
}

.contact-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrollbar styling for modal container */
.contact-modal__container::-webkit-scrollbar {
  width: 8px;
}

.contact-modal__container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.contact-modal__container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.contact-modal__container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Animation for small screens */
@media (max-width: 480px) {
  .contact-modal {
    padding: 0;
    align-items: flex-end;
  }

  .contact-modal__container {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 95vh;
  }
}
