/* Contact Modal Styles */
/* 모달 전용 스타일 */

/* Import Common Styles */
@import url('../common/css/variables.css');
@import url('../common/css/base.css');
@import url('../common/css/form-components.css');

/* Modal Base - Hidden by default */
.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.contact-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Body scroll lock when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal Backdrop */
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-backdrop);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-modal.open .modal-backdrop {
  opacity: 1;
}

/* Modal Container */
.modal-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--modal-shadow);
  margin: 20px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.contact-modal.open .modal-container {
  transform: translateY(0);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Close Button */
.modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.modal-close:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Modal Body */
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Modal-specific form input overrides */
.modal-body input,
.modal-body select,
.modal-body textarea {
  background-color: var(--white);
}

/* Responsive Design */

/* Tablet: 768px and below */
@media (max-width: 768px) {
  .modal-container {
    max-width: 90%;
    max-height: 85vh;
    margin: 15px;
  }

  .modal-header {
    padding: 20px 20px 12px 20px;
  }

  .modal-header h2 {
    font-size: 22px;
  }

  .modal-body {
    padding: 20px;
  }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
  .modal-container {
    max-width: 100%;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    height: 100vh;
  }

  .modal-header {
    padding: 16px 16px 12px 16px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 16px;
  }

  .submit-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
