﻿* {
    box-sizing: border-box;
}
:root {
    --primary-purple: #3f00e5;
    --light-bg: #f8f9fb;
    --border-color: #ddd;
    --text-gray: #666;
}

.sk-container {
    width: 1000px;
    background-color: #fff;
    padding: 20px;
    display: block;
    margin: 0 auto;
}

/* Header Area */
.sk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-purple);
    color: white;
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
}
.span-title {
    color: #fff;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.judalogo {
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
}

.input-inline {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    width: 100px;
}

/* Top Selection Area */
.selection-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-top: none;
    background-color: white;
}

.section-box {
    border: 1px dashed #ccc;
    padding: 15px;
    border-radius: 8px;
}
.section-normal {
    padding: 15px 0;
}
.right-col {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
}
.sk-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

    .sk-row label {
        width: 100px;
        font-weight: bold;
        font-size: 14px;
    }
.label-title {
    text-align: right;
    padding-right: 15px;
}
.sk-extra-charge {
    display: flex;
}
.sk-extra-charge > label {
    width: 100px;
    padding-top: 5px;
    color: #333;
    flex-shrink: 0;
}
.sk-row input {
    flex: 1;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.pay-col {
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    width: 76%;
    padding: 0 10px;
}
.pay-col .sk-row {
    padding: 5px 0;
    margin-bottom: 0;
}
.pay-col .sk-row label {
    width: auto;
    flex: 1;
    font-size: 12px;
}
.btn-group {
    display: flex;
    gap: 5px;
}

.btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

    .btn.active {
        background: var(--primary-purple);
        color: white;
        border-color: var(--primary-purple);
    }

/* Calculation Area (Blue/Purple Section) */
.calculation-container {
    /*background-color: var(--primary-purple);*/
    padding: 5px;
    border-radius: 8px;
    margin-top: 20px;
}

.calc-header {
    background-color: var(--primary-purple);
    color: white;
    text-align: right;
    padding: 5px 10px;
    font-size: 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.8fr;
    gap: 5px;
    border: 1px solid #ccc;
}

.calc-box {
    background: white;
    border-radius: 4px;
    padding: 15px;
    min-height: 400px;
}
.title-wrap {
    border-bottom: 2px solid #3f00e5;
}
.box-title {
    background: var(--primary-purple);
    color: white;
    display: inline-block;
    padding: 0 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 14px;
}
.box-title-text {
    font-size: 14px;
    padding-left: 5px;
}
/* Detail Tables */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .detail-table td {
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .detail-table .val {
        text-align: right;
        font-weight: 400;
    }

    .detail-table .red {
        color: #ff4d4d;
    }

    .detail-table .blue {
        color: var(--primary-purple);
    }

.total-row {
    margin-top: 20px;
    text-align: right;
    border-top: 2px solid var(--primary-purple);
    padding-top: 10px;
}

.total-price {
    font-size: 20px;
    color: var(--primary-purple);
    font-weight: bold;
    text-align: left;
}

/* Notice & Memo Area */
.footer-info {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.notice {
    background-color: #fff9e6;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    font-size: 12px;
    color: #856404;
}

.memo {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    min-height: 150px;
    color: #aaa;
}

/* Bottom Sign Area */
.sign-area {
    background-color: var(--primary-purple);
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-around;
    color: white;
}

.sign-input {
    background: white;
    border: none;
    padding: 5px;
    border-radius: 4px;
    width: 150px;
}
.sk-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sk-extra-total {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    font-weight: bold;
}
.search-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='%23999'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px !important;
}
.radio-btn-group {
    display: inline-flex;
    gap: 8px;
}

/* 1. 실제 동그란 라디오 버튼(input)은 화면에서 숨김 */
.radio-btn-group input[type="radio"] {
    display: none;
}

/* 2. 글자(label)를 버튼처럼 디자인 */
.radio-btn-group label {
    display: inline-block;
    padding: 3px 18px;
    font-size: 13px;
    color: #666;
    background-color: #f8f9fa; /* 기본 연한 회색 배경 */
    border: 1px solid #ddd;
    border-radius: 20px; /* 둥근 알약 모양 */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin: 0;
    width: 130px;
    text-align: center;
    margin: 0 5px;
}

    /* 마우스 호버 시 효과 */
    .radio-btn-group label:hover {
        background-color: #f1f1f1;
    }

/* ⭐ 3. 라디오 버튼이 선택(Checked)되었을 때 바로 뒤의 라벨 색상 변경 */
.radio-btn-group input[type="radio"]:checked + label {
    background-color: #3f00e5;
    color: #fff;
    border-color: #3f00e5;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(179, 46, 191, 0.3);
}


.radiotype-btn-group {
    display: inline-flex;
    gap: 8px;
}

    /* 1. 실제 동그란 라디오 버튼(input)은 화면에서 숨김 */
    .radiotype-btn-group input[type="radio"] {
        display: none;
    }

    /* 2. 글자(label)를 버튼처럼 디자인 */
    .radiotype-btn-group label {
        display: inline-block;
        padding: 3px 18px;
        font-size: 13px;
        color: #666;
        background-color: #f8f9fa; /* 기본 연한 회색 배경 */
        border: 1px solid #ddd;
        border-radius: 20px; /* 둥근 알약 모양 */
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        margin: 0;
        width: 80px;
        text-align: center;
        margin: 0 5px;
    }

        /* 마우스 호버 시 효과 */
        .radiotype-btn-group label:hover {
            background-color: #d3d3d3;
        }

    /* ⭐ 3. 라디오 버튼이 선택(Checked)되었을 때 바로 뒤의 라벨 색상 변경 */
/*    .radiotype-btn-group input[type="radio"]:checked + label {
        background-color: #3f00e5;
        color: #fff;
        border-color: #3f00e5;
        font-weight: bold;
        box-shadow: 0 3px 8px rgba(179, 46, 191, 0.3);
    }*/

 

.buga-slot {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    gap: 8px;
    font-size: 14px;
    width: 100%;
}

.buga-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #3f00e5;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.buga-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    width: 100%;
    min-width: 0; /* flex 자식 요소 텍스트 말줄임을 위한 필수 속성 */
}

.buga-name-text {
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 글자 길면 ... 처리 */
}

.buga-fee {
    font-weight: bold;
    color: #3f00e5;
    white-space: nowrap;
    flex-shrink: 0;
}
@media print {
    /* 1. ★ 핵심: 브라우저 기본 헤더/푸터(URL, 날짜, 페이지 번호) 완전 제거 */
    @page {
        size: A4 portrait; /* A4 세로 방향 강제 */
        margin: 0; /* 여백을 0으로 주어 브라우저가 텍스트를 넣을 공간을 없애버림 */
    }

    /* 2. @page margin을 0으로 줬기 때문에, 컨텐츠가 종이 끝에 딱 붙지 않도록 Body에 여백을 줍니다. */
    body {
        margin: 0;
        padding: 10mm; /* A4 용지 안쪽 여백 (원하시는 대로 조절 가능) */
        box-sizing: border-box;
        visibility: hidden; /* 마스터 페이지 숨김용 (기존 유지) */
    }

    /* 3. 인쇄할 알맹이 영역 설정 (마스터 페이지 숨김 유지) */
    #print_area, #print_area * {
        visibility: visible;
    }

    /* 4. ★ 1페이지로 강제 압축 및 중간 선(잘림) 방지 */
    #print_area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        height: 100% !important;
        padding: 10mm; /* 알맹이에도 여백 조금 추가 */
        /* 내용이 두 장으로 쪼개지지 않도록 방어 */
        page-break-inside: avoid;
        /* ★ 내용을 1페이지에 다 구겨 넣기 위해 비율 축소 (80% ~ 90% 사이로 조절해 보세요) */
        zoom: 85%;
    }

    /* 테이블이나 큰 박스가 중간에 잘리는 것 방지 */
    table, .hero-table, .sk-row {
        page-break-inside: avoid;
    }

    /* 5. 컬러 강제 렌더링 (기존 유지) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 버튼 및 불필요 영역 숨김 (기존 유지) */
    .no-print {
        display: none !important;
    }

    /* 입력창 테두리 최적화 */
    input[type="text"], select, textarea {
        border: 1px solid #ddd !important;
        background: #ffffff !important;
        color: #555555 !important;
    }
    footer,
    #footer,
    .footer,
    #bottom,
    .bottom-wrap {
        display: none !important;
    }
}