/** HERO SECTION LAYOUT (비디오+투명박스+폼) **/

.car-export-wrapper {
  position: relative;
  width: 100vw;
  height: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  padding: 0 5%;
}

.car-export-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  z-index: -1;
  overflow: hidden;
  background-color: #f9f9f9;
}

.car-export-video {
  width: 100vw;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transform: translateY(-25px);
}

.car-export-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: auto;
  position: relative;
  z-index: 2;
  padding-bottom: 7vh;
}

.form-stacked-transparent-boxes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  position: static;
  z-index: 2;
  pointer-events: none;
}

.transparent-overlay-box {
  width: 90vw;
  max-width: 420px;
  height: 430px;
  /* background: rgba(255,255,255,0.18); */
  border-radius: 24px;
  /* backdrop-filter: blur(8px); */
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
  margin-bottom: 0;
}

.car-export-card {
  /* flex: 1; */
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 20px;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 100%;
  transition: box-shadow 0.2s;
  max-width: 420px;
  padding: 30px;
  margin: 50px 0;
}

@media (max-width: 1200px) {
  .car-export-container {
    padding: 0 4%;
    min-height: 100vh;
    height: auto;
  }
  .car-export-card {
    margin-left: 3vw;
  }
}

@media (max-width: 991px) {
  .car-export-container {
    padding: 0 3%;
    justify-content: center;
    align-items: flex-end;
    min-height: 100vh;
    height: auto;
    padding-bottom: 7vh;
    flex-direction: column;
  }
  .car-export-card {
    margin: 0;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
  }
  .form-stacked-transparent-boxes {
    gap: 18px;
    margin-bottom: 18px;
  }
  .transparent-overlay-box {
    border-radius: 24px;
  }
}

@media (max-width: 768px) {
  .car-export-container {
    padding: 0 3%;
    padding-bottom: 8vh;
    min-height: 100vh;
    height: auto;
  }
  .form-stacked-transparent-boxes {
    gap: 12px;
    margin-bottom: 12px;
  }
  .transparent-overlay-box {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .car-export-container {
    padding-top: 0 !important;
    min-height: 100vh;
    height: auto;
    /* padding-bottom은 필요시 유지 */
  }
  .car-export-card {
    padding: 24px;
    border-radius: 16px;
  }
  .car-export-title {
    font-size: 20px;
  }
  .form-stacked-transparent-boxes {
    gap: 8px;
    margin-bottom: 8px;
  }
  .transparent-overlay-box {
    border-radius: 12px;
  }
  /* 전화번호 입력 필드를 한 줄로 유지하되 크기 조정 */
  .car-export-phone-group {
    gap: 6px;
  }
  .car-export-phone-group .car-export-input {
    padding: 12px 8px;
    font-size: 15px;
  }
  /* 첫 번째 필드(010)를 약간 더 작게 만듦 */
  .car-export-phone-group .car-export-input:first-child {
    flex: 0.8;
  }
  .car-export-modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .car-export-container {
    padding-top: 0 !important;
    min-height: 100vh;
    height: auto;
  }
  .car-export-card {
    padding: 20px;
  }
  .car-export-input {
    padding: 10px 12px;
    height: 44px;
  }
  .car-export-phone-group .car-export-input {
    padding: 10px 6px;
    font-size: 14px;
  }
}

/* 데스크탑에서 투명박스 숨김, 태블릿 이하에서만 보임 */
@media (min-width: 992px) {
  .transparent-overlay-box {
    opacity: 0 !important;
    pointer-events: none;
    display: none;
  }

  .car-export-wrapper {
    justify-content: flex-end;
    align-items: center;
    height: 70vh;
    /* min-height: 80vh; */
    overflow-x: hidden;
    position: relative;
  }

  .car-export-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: auto;
    position: relative;
    z-index: 2;
    padding-top: 7vh;
    padding-bottom: 7vh;
  }

  .car-export-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
  }

  .car-export-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    position: relative;
    z-index: 4;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    transition: box-shadow 0.2s;
    max-width: 420px;
    padding: 30px;
    margin: 50px 0;
  }

  .car-export-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
  }

  .car-export-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .car-export-input {
    height: 100%;
    min-height: 46px;
    font-size: 18px;
  }

  .car-export-phone-group {
    flex: 1;
    display: flex;
    gap: 8px;
  }

  .car-export-phone-group .car-export-input {
    flex: 1;
    height: 100%;
  }

  .car-export-submit-btn {
    align-self: flex-end;
    margin-top: 24px;
    height: 56px;
    font-size: 18px;
  }
}

.car-export-title {
  font-size: 22px;
  color: #0099ff;
  margin-bottom: 16px;
  font-weight: 700;
}

.car-export-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 16px 0;
}

.car-export-form-group {
  margin-bottom: 16px;
  position: relative;
}

.car-export-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  color: #333;
  transition: all 0.3s ease;
  height: 46px;
}

.car-export-input::placeholder {
  color: #a9a9a9;
}

.car-export-input:focus {
  border-color: #0099ff;
  box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.1);
}

.car-export-input.error {
  border-color: #ff3333;
  background-color: rgba(255, 51, 51, 0.03);
}

.car-export-phone-group {
  display: flex;
  gap: 8px;
}

.car-export-phone-group .car-export-input {
  flex: 1;
}

.car-export-agreement {
  display: flex;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 14px;
  color: #a9a9a9;
}

.car-export-checkbox {
  width: auto;
  margin-right: 8px;
  margin-top: 2px;
  height: auto;
}

.car-export-agreement-text {
  display: flex;
  flex-wrap: wrap;
}

.car-export-link {
  color: #0099ff;
  text-decoration: none;
  margin-left: 4px;
}

.car-export-link:hover {
  text-decoration: underline;
}

.car-export-submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #0099ff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s;
  height: 50px;
}

.car-export-submit-btn:hover {
  background-color: #0088ee;
}

.car-export-submit-btn:disabled {
  background-color: #7fc6f5;
  cursor: not-allowed;
}

.car-export-arrow {
  margin-left: 8px;
}

/* 에러 메시지 스타일 향상 */
.car-export-error-message {
  color: #ff3333;
  font-size: 13px;
  margin-top: 6px;
  display: none; /* 기본적으로 숨김 */
  padding: 6px 10px;
  background-color: rgba(255, 51, 51, 0.08);
  border-radius: 6px;
  border-left: 3px solid #ff3333;
  animation: car-export-fadeIn 0.3s ease;
  align-items: center;
}

.car-export-error-message::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: #ff3333;
  color: white;
  border-radius: 50%;
  margin-right: 6px;
  font-size: 10px;
  font-weight: bold;
}

/* 전화번호 그룹 에러 메시지 위치 */
.car-export-phone-error-container {
  margin-top: 5px;
}

/* 커스텀 모달/팝업 스타일 */
.car-export-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.car-export-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.car-export-modal {
  background-color: white;
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.car-export-modal-overlay.active .car-export-modal {
  transform: translateY(0);
}

.car-export-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.car-export-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.car-export-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s;
}

.car-export-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #333;
}

.car-export-modal-body {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.5;
  font-size: 15px;
}

.car-export-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.car-export-modal-button {
  padding: 10px 20px;
  background-color: #0099ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.car-export-modal-button:hover {
  background-color: #0088ee;
}

.car-export-modal-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.car-export-modal-icon.success {
  color: #00c853;
  font-size: 44px;
}

.car-export-modal-icon.warning {
  color: #ff9800;
  font-size: 44px;
}

.car-export-modal-icon.error {
  color: #f44336;
  font-size: 44px;
}

/* 로딩 스피너 */
.car-export-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: car-export-spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes car-export-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 애니메이션 키프레임 */
@keyframes car-export-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* XML 미리보기 모달 */
.car-export-xml-preview {
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  overflow-x: auto;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  border: 1px solid #ddd;
}

.car-export-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.car-export-modal-secondary-button {
  padding: 10px 20px;
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.car-export-modal-secondary-button:hover {
  background-color: #e5e5e5;
}
