/* Common Components - 재사용 가능한 공통 컴포넌트 */

/* 텍스트/타이포그래피 스타일 */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: bold;
    color: #333;
}

h1 {
    font-size: 32px;
    line-height: 1.2;
}

h2 {
    font-size: 24px;
    line-height: 1.3;
}

h3 {
    font-size: 20px;
    line-height: 1.4;
}

h4 {
    font-size: 18px;
    line-height: 1.4;
}

p {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

a {
    color: #00AD55;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #008a44;
    text-decoration: underline;
}

/* 텍스트 색상 유틸리티 */
.text-primary {
    color: #00AD55;
}

.text-secondary {
    color: #666;
}

.text-muted {
    color: #999;
}

.text-dark {
    color: #333;
}

.text-white {
    color: #fff;
}

/* 폰트 크기 유틸리티 */
.text-xs {
    font-size: 12px;
}

.text-sm {
    font-size: 14px;
}

.text-base {
    font-size: 16px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 32px;
}

/* 폰트 웨이트 */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* 텍스트 정렬 */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* 텍스트 변환 */
.uppercase {
    text-transform: uppercase;
}

.lowercase {
    text-transform: lowercase;
}

.capitalize {
    text-transform: capitalize;
}

/* 줄 간격 */
.leading-tight {
    line-height: 1.25;
}

.leading-normal {
    line-height: 1.5;
}

.leading-relaxed {
    line-height: 1.75;
}

.leading-loose {
    line-height: 2;
}

/* 버튼 */
.booking-btn {
    width: 100%;
    padding: 12px 15px;
    background: #00AD55;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    transition: background 0.3s;
    box-sizing: border-box;
}

.booking-btn:hover {
    background: #008a44;
}

/* 폼 요소 */
.header-search {
    width: 187px;
    height: 36px;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 100%;
    padding: 0 36px 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.header-search input:focus {
    outline: none;
    border-color: #2e7d32;
}

.header-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    color: #999;
}

/* 아이콘 */
.info-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #999;
    color: #fff;
    font-size: 10px;
    text-align: center;
    line-height: 14px;
    margin-left: 4px;
}

/* 링크 */
.booking-policy-link {
    color: #000;
    text-decoration: underline;
    cursor: pointer;
}

/* 박스 */
.right-box {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
}

/* ========== 폼 공통 스타일 (골프/항공/호텔/렌트카 공통) ========== */

/* 폼 섹션 */
.form-section {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.form-section:first-child {
    margin-top: 0;
}

/* 섹션 타이틀 */
.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #00AD55;
}

/* 폼 테이블 */
.form-table {
    border: 1px solid #e0e0e0;
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    margin-bottom: 0;
    margin-top: 0;
}

.form-table td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    vertical-align: middle;
}

.form-table td:first-child {
    width: 28%;
    background-color: #f8f9fa;
    font-weight: 500;
    color: #333;
    font-size: 13px;
    padding: 10px 14px;
}

.form-table td:last-child {
    width: 72%;
    background-color: #fff;
    padding: 10px 14px;
}

.form-table tr:first-child td {
    border-top: 1px solid #e0e0e0;
}

.form-table tr:last-child td {
    border-bottom: 1px solid #e0e0e0;
}

/* 입력 필드 */
.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    line-height: 1.4;
}

.form-input:focus {
    outline: none;
    border-color: #00AD55;
    box-shadow: 0 0 0 3px rgba(0, 173, 85, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* 셀렉트 필드 */
.form-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 1.4;
}

.form-select:focus {
    outline: none;
    border-color: #00AD55;
    box-shadow: 0 0 0 3px rgba(0, 173, 85, 0.1);
}

/* 참가자/인원 섹션 (골프 플레이어, 항공 승객, 호텔 투숙객 등) */
.participant-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.participant-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 플레이어 섹션 (하위 호환성) */
.player-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.player-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 라디오 버튼 그룹 - 성별 1줄로 표시 */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00AD55;
}

.radio-item label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin: 0;
}

/* 입력 도움말 텍스트 */
.input-help-text {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* 카드번호 입력 그룹 - 간격과 높이 고려 */
.card-number-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.card-number-input {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.4;
    width: 100%;
    height: 40px;
}

.card-number-input:focus {
    outline: none;
    border-color: #00AD55;
    box-shadow: 0 0 0 3px rgba(0, 173, 85, 0.1);
}

/* 카드 유효기간 입력 그룹 - MM/YY 크기 표준화 */
.card-expiry-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.card-expiry-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 1.4;
    height: 40px;
}

.card-expiry-select:focus {
    outline: none;
    border-color: #00AD55;
    box-shadow: 0 0 0 3px rgba(0, 173, 85, 0.1);
}

/* 결제 폼 필드 */
.payment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-field .field-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* 안내 박스 */
.form-info-box {
    margin-top: 20px;
}

.form-info-box .info-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-info-box .info-title i {
    font-size: 16px;
}

.form-info-box .info-list {
    padding-left: 12px;
    line-height: 1.0 !important;
}

.form-info-box .info-list span {
    display: block !important;
    margin-bottom: 4px;
    line-height: 1.0 !important;
}

.form-info-box .info-list span:last-child {
    margin-bottom: 0;
}

/* 필수 표시 */
.required {
    color: #e74c3c;
    margin-left: 3px;
}

/* 반응형 - 공통 */
@media (max-width: 1279px) {
    .header-search {
        width: 160px;
        height: 32px;
    }
    
    .header-search input {
        font-size: 12px;
        padding: 0 32px 0 10px;
    }
    
    .header-search-icon {
        width: 16px;
        height: 16px;
        right: 8px;
    }
}

/* 모바일 반응형 - 폼 공통 */
@media (max-width: 768px) {
    .form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* 모바일에서 form-table을 세로형 레이아웃으로 변경 */
    .form-table,
    .form-table tbody,
    .form-table tr,
    .form-table td {
        display: block;
        width: 100% !important;
    }
    
    .form-table {
        border: none;
        background: transparent;
    }
    
    .form-table tr {
        margin-bottom: 12px;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 0;
        overflow: hidden;
    }
    
    .form-table td {
        border: none;
        padding: 12px 14px;
        display: block;
    }
    
    .form-table td:first-child {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #333;
        font-size: 13px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .form-table td:last-child {
        background-color: #fff;
        padding-top: 8px;
    }
    
    /* 참가자/플레이어 섹션 모바일 조정 */
    .participant-section,
    .player-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .participant-title,
    .player-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    /* 입력 필드 모바일 조정 */
    .form-input,
    .form-select {
        font-size: 16px; /* iOS 줌 방지 */
        padding: 12px;
    }
    
    /* 카드번호 입력 모바일 조정 - 간격과 높이 고려 */
    .card-number-group {
        flex-wrap: nowrap;
        gap: 8px;
        align-items: stretch;
    }
    
    .card-number-input {
        flex: 1 1 0;
        min-width: 0;
        font-size: 16px;
        padding: 12px 8px;
        height: 48px;
        box-sizing: border-box;
    }
    
    /* 유효기간 MM/YY 크기 표준화 */
    .card-expiry-group {
        gap: 8px;
        align-items: stretch;
    }
    
    .card-expiry-select {
        flex: 1;
        font-size: 16px;
        padding: 12px 10px;
        height: 48px;
        box-sizing: border-box;
    }
    
    /* radio group 모바일 조정 - 성별 1줄로 표시 */
    .radio-group {
        gap: 20px;
        flex-wrap: nowrap;
    }
    
    .radio-item {
        flex: 0 0 auto;
    }
}
