/**
 * 홈(검사일 조회) 페이지 전용 스타일
 */

/* 모바일 검사일 조회(home/index): 100% 줌에서도 브라우저 80% 축소에 가까운 밀도·여백 */
body.home-search .wrap {
    max-width: 400px;
}

body.home-search .home-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    padding-top: max(16px, env(safe-area-inset-top));
}

body.home-search .home-search-header h1,
body.home-search .home-search-header .home-search-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    margin: 0;
}

body.home-search .home-search-back {
    color: #005df5;
    text-decoration: none;
    font-size: 1rem;
}

body.home-search .home-search-pc {
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
}

.info-section {
    padding: 25px 20px;
    background: linear-gradient(135deg, #0068ff 0%, #0052cc 100%);
    color: #fff;
    text-align: center;
}

.info-section h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.info-section p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.form-section {
    padding: 30px 20px;
    padding-bottom: 40px;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #444;
}

.input-group input[type="text"],
.input-group input[type="tel"] {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    outline: none;
    background-color: #fcfcfc;
}

.input-group input[type="text"]:focus,
.input-group input[type="tel"]:focus {
    border-color: #0068ff;
    box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.2);
    background-color: #fff;
}

.input-group input::placeholder {
    color: #bbb;
}

.agreement-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #eee;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.check-item label {
    cursor: pointer;
    display: flex;
    align-items: center;
    flex: 1;
}

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #0068ff;
    cursor: pointer;
}

.btn-more {
    font-size: 0.8rem;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 10px;
}

.check-all {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-weight: 700;
    color: #0068ff;
}

.searchbtn {
    width: 100%;
    padding: 16px;
    background-color: #0068ff;
    color: #fff;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 104, 255, 0.4);
    transition: background 0.3s;
}

.searchbtn:hover {
    background-color: #0052cc;
}

.searchbtn:active {
    transform: scale(0.98);
}

/* 약관 모달 */
.overlay {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.overlay-content {
    background: #fff;
    margin: 10% auto;
    padding: 25px;
    width: 85%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.overlay-content h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #0068ff;
}

.overlay-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.closebtn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    text-decoration: none;
    font-weight: bold;
}

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

/* 로딩 패널 */
.LoadingPanel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

#AllProgress {
    display: none;
}

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

.loading-inner img {
    width: 50px;
}

.loading-inner p {
    margin-top: 10px;
    font-weight: bold;
    color: #0068ff;
}

/* ===== 휴대폰 자동 반응형 ===== */
@media (max-width: 480px) {
    .info-section {
        padding: 20px 16px;
        padding-top: max(20px, env(safe-area-inset-top));
    }

    .info-section h2 {
        font-size: 1.25rem;
    }

    .info-section p {
        font-size: 0.9rem;
    }

    .form-section {
        padding: 20px 16px;
        padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom)));
    }

    .input-group {
        margin-bottom: 12px;
    }

    .input-group input[type="text"],
    .input-group input[type="tel"] {
        padding: 14px 16px;
        font-size: 16px; /* iOS 줌 방지 */
        min-height: 48px; /* 터치 타겟 44px 이상 */
    }

    .agreement-box {
        padding: 16px;
        margin-top: 18px;
    }

    .check-item {
        margin-bottom: 14px;
        font-size: 0.88rem;
    }

    .check-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    .searchbtn {
        padding: 16px;
        min-height: 52px;
        font-size: 1rem;
        margin-top: 16px;
    }

    /* 약관 모달 - 모바일 최적화 */
    .overlay-content {
        margin: 5% 12px;
        width: calc(100% - 24px);
        max-width: none;
        max-height: 85vh;
        padding: 20px 16px;
        padding-top: max(20px, env(safe-area-inset-top));
    }

    .closebtn {
        top: 12px;
        right: 16px;
        font-size: 28px;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }

    /* 로딩 패널 */
    .LoadingPanel {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }

    /* 100% 줌에서 80%와 유사: 폼·약관·버튼 밀도 (home-search 전용) */
    body.home-search .info-section {
        padding: 18px 14px;
    }

    body.home-search .info-section h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    body.home-search .info-section p {
        font-size: 0.88rem;
    }

    body.home-search .form-section {
        padding: 22px 14px;
        padding-bottom: max(32px, calc(20px + env(safe-area-inset-bottom)));
    }

    body.home-search .input-group {
        margin-bottom: 10px;
    }

    body.home-search .input-group label {
        font-size: 0.88rem;
        margin-bottom: 3px;
    }

    body.home-search .input-group input[type="text"],
    body.home-search .input-group input[type="tel"] {
        padding: 11px 12px;
        font-size: 16px; /* iOS 자동확대 방지 유지 */
        min-height: 46px;
        border-radius: 6px;
    }

    body.home-search .agreement-box {
        padding: 14px;
        margin-top: 16px;
        border-radius: 6px;
    }

    body.home-search .check-item {
        margin-bottom: 10px;
        font-size: 0.84rem;
    }

    body.home-search .check-item input[type="checkbox"] {
        width: 17px;
        height: 17px;
        min-width: 17px;
        min-height: 17px;
    }

    body.home-search .btn-more {
        font-size: 0.75rem;
        margin-left: 0;
    }

    body.home-search .check-all {
        margin-top: 12px;
        padding-top: 12px;
    }

    body.home-search .searchbtn {
        padding: 13px;
        min-height: 48px;
        font-size: 1rem;
        margin-top: 16px;
        border-radius: 6px;
        box-shadow: 0 3px 8px rgba(0, 104, 255, 0.35);
    }
}

/* 초소형 기기 (360px 이하) */
@media (max-width: 360px) {
    .info-section h2 {
        font-size: 1.15rem;
    }

    .form-section {
        padding: 18px 12px;
        padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom)));
    }

    .agreement-box {
        padding: 12px;
    }

    .check-item span {
        font-size: 0.82rem;
    }

    body.home-search .wrap {
        max-width: min(400px, 100%);
    }

    body.home-search .form-section {
        padding: 16px 12px;
        padding-bottom: max(28px, calc(18px + env(safe-area-inset-bottom)));
    }

    body.home-search .agreement-box {
        padding: 12px;
    }
}
