/**
 * Vavoom MyPage - 모달 스타일
 */

/* 모달 오버레이 */
.vavoom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

/* 모달 컨테이너 */
.vavoom-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모달 헤더 */
.vavoom-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vavoom-modal-header h3 {
  margin: 0;
  font-size: 20px !important;
  font-weight: 600;
  color: #333;
}

.vavoom-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.vavoom-modal-close:hover {
  color: #333;
}

/* 모달 바디 */
.vavoom-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* 모달 푸터 */
.vavoom-modal-footer {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 폼 스타일 */
.vavoom-form-row {
  margin-bottom: 20px;
}

.vavoom-form-group {
  display: flex;
  flex-direction: column;
}

.vavoom-form-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.vavoom-form-group input[type="text"],
.vavoom-form-group input[type="tel"],
.vavoom-form-group input[type="email"],
.vavoom-form-group textarea,
.vavoom-form-group select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.vavoom-form-group input:focus,
.vavoom-form-group textarea:focus,
.vavoom-form-group select:focus {
  outline: none;
  border-color: #007cba;
}

.vavoom-form-group input[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* 주소 검색 버튼 그룹 */
.vavoom-address-search {
  display: flex;
  gap: 10px;
}

.vavoom-address-search input {
  flex: 1;
}

.vavoom-address-search-btn {
  padding: 10px 20px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.vavoom-address-search-btn:hover {
  background: #005a87;
}

/* 버튼 스타일 */
.vavoom-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.vavoom-btn-primary {
  background: #007cba;
  color: white;
}

.vavoom-btn-primary:hover {
  background: #005a87;
}

.vavoom-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.vavoom-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.vavoom-btn-secondary:hover {
  background: #e0e0e0;
}

/* 로딩 스피너 */
.vavoom-loading {
  text-align: center;
  padding: 40px;
}

.vavoom-loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.vavoom-loading p {
  margin-top: 20px;
  color: #666;
}

/* 오늘배송 선택 옵션 스타일 */
.today-delivery-option {
  padding: 20px 0;
}

.delivery-info {
  text-align: center;
  margin-bottom: 30px;
}

.delivery-info h4 {
  color: #f95251;
  font-size: 18px;
  margin-bottom: 10px;
}

.delivery-comparison {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.delivery-option {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.delivery-option:hover {
  border-color: #f95251;
  background-color: #fff8f8;
}

.delivery-option.highlight {
  border-color: #f95251;
  background: linear-gradient(135deg, #fff8f8 0%, #fff 100%);
}

.delivery-option.highlight::before {
  content: "추천";
  position: absolute;
  top: -8px;
  right: 10px;
  background: #f95251;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.option-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.option-header input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.option-header label {
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  margin: 0;
}

.option-details p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.option-details .surcharge {
  color: #f95251;
  font-weight: bold;
}

.option-details .delivery-time {
  color: #2ecc71;
  font-weight: bold;
}

/* 라디오 버튼 선택 시 스타일 */
.delivery-option:has(input[type="radio"]:checked) {
  border-color: #f95251;
  background-color: #fff8f8;
  box-shadow: 0 2px 8px rgba(249, 82, 81, 0.2);
}

/* 반응형 */
@media (max-width: 480px) {
  .vavoom-modal {
    margin: 10px;
  }

  .vavoom-modal-header,
  .vavoom-modal-body,
  .vavoom-modal-footer {
    padding: 15px;
  }

  .vavoom-address-search {
    flex-direction: column;
  }

  .vavoom-modal-footer {
    flex-direction: column;
  }

  .vavoom-btn {
    width: 100%;
  }
  
  .delivery-comparison {
    flex-direction: column;
  }
  
  .delivery-option {
    margin-bottom: 15px;
  }
  
  .delivery-option.highlight::before {
    top: 5px;
    right: 5px;
  }
}
