/* ------------------------------------------------------------------
   📌 팝업 전용 스타일
------------------------------------------------------------------ */

body.admin-detail-body {
    margin: 0;
    padding: 0;
    background: #f5f6f7;
    font-family: "Segoe UI", "맑은 고딕", sans-serif;
    overflow-y: auto;
}

/* ------------------------------------------------------------------
   📌 팝업 컨테이너
------------------------------------------------------------------ */
.detail-wrapper {
    width: 860px; /* 팝업 내부에 맞게 */
    margin: auto;
    background: #fff;
    padding: 5px 30px 10px 30px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* 제목 */
.page-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
}

/* ------------------------------------------------------------------
   📌 섹션 제목
------------------------------------------------------------------ */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: #f38b00;
    margin: 5px 0 5px 0;
    border-left: 5px solid #f38b00;
    padding-left: 10px;
}

/* ------------------------------------------------------------------
   📌 정보 테이블 (상품·고객)
------------------------------------------------------------------ */
.admin-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.admin-detail-table th {
    width: 150px;
    height: 25px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 10px;
    font-weight: 600;
    color: #444;
    font-size: 13px;
}

.admin-detail-table td {
    border: 1px solid #e5e5e5;
    height: 25px;
    padding: 10px;
    font-size: 13px;
    color: #333;
}

.admin-detail-table td input{
    width: 100%;
    padding: 5px 5px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
}

/* ------------------------------------------------------------------
   📌 매입 진행 (라디오 + 입력창)
------------------------------------------------------------------ */
.choice-row {
    display: flex;
    align-items: center;
    gap: 35px;
    margin-bottom: 15px;
}

.choice-row label {
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.choice-row input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* 매입가 입력 */
.default-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.default-row textarea,
.default-row input {
    width: 150px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
}

.default-row label {
    font-size: 13px;
}

.btn-save:hover {
    background: #e38600;
}

/* ------------------------------------------------------------------
   📌 Lightbox (이미지 확대보기)
------------------------------------------------------------------ */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background: rgba(0,0,0,0.85);
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    margin-top: 60px;
    border-radius: 8px;
    box-shadow: 0 0 20px #000;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    font-size: 36px;
    padding: 20px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.lightbox-prev { left: 5%; }
lightbox-next { right: 5%; }

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ff9600;
}

/* 저장 버튼 */
.btn-save {
    background: #ff9600;
    border: none;
    padding: 12px 26px;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-search,
.btn-delete,
.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #0077c8;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.btn-delete {
    padding: 3px 1px;
	background: #FF0000;
    border-radius: 1px;
}

/* 금액필드 */
.price {
    text-align: right;
}

input,
textarea {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
}
select {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-sizing: border-box;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

/* ------------------------------------------------------------------
   📌 이미지 리스트
------------------------------------------------------------------ */
.img-list {
    display: flex;
    width: 100%;
    gap: 12px;
    margin: 15px 0 15px 0;
}

.thumb-box {
    width: 130px;
    height: 130px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 6px;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* 썸네일 외곽 */
.thumb-wrap {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

/* 삭제 버튼 */
.thumb-delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.thumb-delete:hover {
    background: #ff4949;
    color: #fff;
}

/* 📌 Datepicker 헤더의 연·월 순서 변경 */
.ui-datepicker .ui-datepicker-title {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.ui-datepicker-year {
    order: 1;   /* 년 먼저 */
}

.ui-datepicker-month {
    order: 2;   /* 월 다음 */
}
/* 테이블 말줄임 공통 */
.ellipsis {
    max-width: 140px;          /* 원하는 최대 너비 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 전체 어둡게 덮는 오버레이 */
.ios-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35); /* iOS 반투명 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* iOS spinner */
.ios-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: iosSpin 1s linear infinite;
}

@keyframes iosSpin {
    to {
        transform: rotate(360deg);
    }
}

.required {
  color: #e53935;
  font-weight: 700;
  position: relative;
  top: -1px;
}

