/* /resources/css/pages/transit/simpCalcRequest.css */

/* 전체 랩핑 */
.simpleCalcul-wrap {
    max-width: 1490px;
    display: flex;
    margin: 0 auto;
    background: #fff;
    gap: 50px;
    padding-bottom: 40px;
}

/* 왼쪽 지도 */
.simpleCal-map-category {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 780px; /* 폼 높이와 균형 맞춤 */
    border-radius: 20px;
    box-shadow: 0 2px 12px 0 rgba(60, 80, 120, 0.09);
    /* padding: 30px; */
    box-sizing: border-box;
}
.nation-map-slider {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 680px;
    max-height: 515px;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.map-slide {
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.map-slide.active {
    opacity: 1;
}

/* 오른쪽 폼 */
.transit-calcul-category {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 12px 0 rgba(60, 80, 120, 0.09);
    /* padding: 30px; */
    box-sizing: border-box;
}

.transit-calcul-desc {
    font-size: 1.35rem;
    font-weight: 500;
    margin-top: 30px; /* 타이틀 상단 여백 추가 */
    margin-bottom: 40px;
    text-align: center;
}

/* form 구조 */
.transit-calcul-form {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1; /* 폼이 영역을 채우도록 설정 */
    padding: 0 30px; /* 폼 내부 좌우 여백 */
}
.transit-form-row-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 행 간 간격 조정 */
}
.transit-form-row {
    display: flex;
    gap: 12px;
}
.transit-form-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 6px;
}
.transit-form-row label {
    font-weight: 400;
    font-size: 1.08rem;
    color: #343a40;
    letter-spacing: 0.13em;
}
/* =========================
   이메일 1행 레이아웃(공통)
   ========================= */
.transit-email-wrap {
  display: flex;
  align-items: flex-start;  /* 위쪽 기준 정렬 (메시지가 떠도 줄 흐트러지지 않음) */
  gap: 6px;
  width: 100%;
}

/* 입력+메시지 세트(아이디/도메인) — 가변 칸 */
.transit-email-wrap .email-input-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 0%;   /* 남은 공간 공평 분배 + 내용이 가로폭에 영향 못 주도록 0% */
  min-width: 0;   /* 긴 메시지로 칸이 늘어나는 것 방지 */
}

/* 입력은 가로 100% 채움(안정) */
.email-input-row .transit-form-input { width: 100%; }

/* @ 기호 — 항상 세로 중앙, 입력 높이와 맞춤 */
.transit-email-wrap .email-at {
  display: flex;
  align-items: center;
  height: 39px;   /* .transit-form-input 높이와 동일 */
  padding: 0 4px;
  color: #6d8498;
  font-weight: 500;
  font-size: 1.08em;
}

/* 셀렉트 영역 — 고정 폭(원하는 값으로 조절 가능) */
.transit-email-wrap .email-select-row {
  flex: 0 0 160px;  /* 고정 폭 */
  min-width: 140px; /* 최소 안전폭 */
}
.transit-email-wrap .email-select-row .transit-form-select {
  width: 100%;
  height: 39px;     /* 입력 높이와 통일 */
  box-sizing: border-box;
}

/* ================================================= */
/* ===== 테마 적용으로 수정된 핵심 스타일 영역 시작 ===== */
/* ================================================= */
.transit-form-input,
.transit-form-select,
.transit-read-input {
    width: 100%;
    min-width: 0;
    font-size: 1.03rem;
    padding: 8px 10px;
    color: #363c43;
    border: 1px solid #79c4ff;
    border-radius: 5px;
    outline: none;
    background: #fafdff;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    font-weight: 300;
    box-sizing: border-box;
    letter-spacing: 0.07em;
}

/* input, select 호버 및 포커스 상태 스타일*/
.transit-form-input:hover,
.transit-form-select:hover,
.transit-form-input:focus,
.transit-form-select:focus,
.comm-checkbox:focus,
.btn-agree-content:focus {
    border-color: #2196f3;
    background-color: #eef7fd;
    box-shadow: 0 0 0 2px #bae2ff;
}

/* 클릭 가능한 readonly 상태 (주소 검색) */
.transit-form-input[readonly] {
    cursor: pointer;
    /* background-color: #fafdff; */ /* 기본 입력창과 동일한 배경색 */
}

/* 클릭 불가능한 readonly 상태 (결과 표시용) */
.transit-read-input {
    background-color: #f2f6fa !important; /* 비활성 배경색 */
    /* color: #555; */
    cursor: not-allowed;
    text-align: right; /* 텍스트 오른쪽 정렬 */
    padding-right: 65px; /* 수정된 부분: 핵심: 단위(Km, 원)가 들어갈 공간 확보 */
    
}
/*플레이스홀더만 왼쪽 정렬로 변경하는 코드 */
.transit-read-input::placeholder {
    text-align: left; /* 플레이스홀더 텍스트는 왼쪽 정렬 */
    /* color: #b1b7c5; */ /* 플레이스홀더 색상 지정 */
}

/* select 커스텀 화살표 */
.transit-form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('/resources/images/comm/icon/menu_down.svg');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px 24px;
    cursor: pointer;
}
.transit-form-select option { color: #222; }
.transit-form-select option[value=""] {
    color: #b1b7c5;
}

.input-with-icon {
    position: relative;
    width: 100%;
}
.input-with-icon .addr-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* 단위 표시 (km, 원) */
.input-unit-distance,
.input-unit-money {
    position: relative;
    width: 100%;
}
.input-unit-distance .unit-inbox,
.input-unit-money .unit-inbox {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.04rem;
    color: #636161;
    pointer-events: none;
    font-weight: 400;
}
.input-unit-distance .transit-read-input { padding-right: 43px; } /* Km: 살짝 넉넉 */
.input-unit-money    .transit-read-input { padding-right: 32px; } /* 원: 좁게 */

.requ-regist-button-row {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 산출 결과 메시지 */
#calculResultMsg {
    margin-top: 15px;
    padding: 10px 15px;
    font-size: 1.03rem;
    border-radius: 8px;
    min-height: 20px;
    text-align: center;
    transition: all 0.2s;
    word-break: keep-all;
    display: none;
}
#calculResultMsg.error {
    background: #fff6f6;
    color: #db2828;
    border: 1px solid #ffbdbd;
    display: block;
}
#calculResultMsg.success {
    background: #e8f9ee;
    color: #249859;
    border: 1px solid #74e1ae;
    display: block;
}

/* 거리 계산 메시지 */
#calculResultMsg.distance {
  background: #e8f0fe;   /* 파란 톤 */
  color: #1a73e8;
  border: 1px solid #a6c8ff;
  display: block;
}

/* 운임 계산 메시지 */
#calculResultMsg.fee {
  background: #fff7e6;   /* 주황 톤 */
  color: #e67e22;
  border: 1px solid #f5c085;
  display: block;
}
/* 필요하면 정보용(회색톤)도 */
#calculResultMsg.info {
  background: #f4f6f8;
  color: #5f6c7b;
  border: 1px solid #d9e1e8;
  display: block;
}
/* 운임 진행/완료(보라톤) — 필요하면 색상만 바꾸세요 */
/* #calculResultMsg.fee {
  background: #f5efff;
  color: #6b4fd9;
  border: 1px solid #d7cfff;
} */
/* =============================================== */
/* ===== 테마 적용으로 수정된 핵심 스타일 영역 끝 ===== */
/* =============================================== */

/* 안내문 및 IP 정보 */
.calcul-search-wrap {
    margin: 20px 30px 0 30px; /* 폼과 동일한 좌우 여백 적용 */
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    font-size: 0.99rem;
}
.calcul-search-wrap ul {
    margin: 0 0 20px 0;
    padding: 0 0 0 0.7em;
    color: #415175;
    line-height: 1.6;
    list-style: none;
}
.calcul-search-wrap ul li {
    position: relative;
    margin-bottom: 5px;
    padding-left: 1.2em;
}
.calcul-search-wrap ul li::before {
    content: "";
    position: absolute;
    left: 0.05em;
    top: 0.75em;
    transform: translateY(-50%);
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    background: #8db2f7;
    display: inline-block;
}
.calcul-info-text {
    color: #8c53de;
    font-weight: 500;
}

.user-ip-info {
    color: #48506d;
}
.ip-set {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    margin-bottom: 10px;
}
.ip-label {
    background: #eef1f6;
    color: #57739c;
    font-weight: 400;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 1.03rem;
    white-space: nowrap;
}
.ip-box {
    display: inline-block;
    min-width: 300px;
    font-size: 1.03rem;
    color: #4CAF50;
    padding: 4px 8px;
    border: 1px solid #79c4ff;
    border-radius: 5px;
    background: #f2f6fa;
    text-align: center;
}
.ip-count {
    min-width: 50px;
    font-weight: bold;
    color: #2196f3;
}

/* 반응형 레이아웃 */
@media (max-width: 1080px) {
    .simpleCalcul-wrap {
        flex-direction: column;
        gap: 28px;
    }
    .simpleCal-map-category {
        min-height: 400px; /* 모바일에서 지도 높이 조정 */
    }
    .transit-calcul-category {
        padding: 20px;
    }
}

@media (max-width: 680px) {
    .simpleCalcul-wrap {
        padding: 10px 0 20px 0;
    }
    .transit-form-row {
        flex-direction: column;
        gap: 18px;
    }
    .simpleCal-map-category {
        display: none; /* 모바일에서 지도는 숨김 처리 */
    }
    .transit-calcul-form, .calcul-search-wrap {
        padding: 0 20px; /* 모바일에서 폼 좌우 여백 조정 */
        margin-left: 0; margin-right: 0;
    }
}
