/* 인쇄 서비스 모달 스타일 */
.print-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.print-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.print-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.print-modal-overlay.active .print-modal {
    transform: scale(1);
}

.print-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.print-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.print-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #666;
    transition: color 0.2s;
}

.print-modal-close:hover {
    color: #333;
}

.print-modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.print-modal-notice {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.print-modal-notice p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.print-modal-notice a {
    color: #b82647;
    text-decoration: none;
}

.print-modal-input-group {
    margin-bottom: 20px;
}

.print-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.print-modal-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

.print-modal-textarea:focus {
    outline: none;
    border-color: #b82647;
}

.print-modal-char-count {
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.print-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.print-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.print-modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.print-modal-btn-cancel:hover {
    background: #e0e0e0;
}

.print-modal-btn-save {
    background: #b82647;
    color: white;
}

.print-modal-btn-save:hover {
    background: #a01f3d;
}

/* ===================================
   인쇄 내용 표시 영역 (장바구니, 주문 등)
   =================================== */

/* 기본 wrapper 스타일 */
.sok-print-content-wrapper {
    margin-top: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

/* 인쇄 내용 표시 영역 */
.sok-print-content-display {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

/* 인쇄 라벨 */
.sok-print-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    display: inline-block;
}

/* 인쇄 텍스트 내용 */
.sok-print-text {
    flex: 1;
    color: #212529;
    line-height: 1.5;
    word-break: break-word;
    min-height: 20px;
}

/* 내용이 없을 때 */
.sok-print-text:empty::before,
.sok-print-text.empty::before {
    content: "내용을 입력해주세요";
    color: #adb5bd;
    font-style: italic;
}

/* 수정 버튼 */
.sok-print-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.sok-print-edit-btn:hover {
    background-color: #b82647;
    border-color: #b82647;
    color: #fff;
}

.sok-print-edit-btn svg {
    width: 14px;
    height: 14px;
}

/* ===================================
   Mode별 스타일 변형
   =================================== */

/* Cart 모드 */
.mode-cart .sok-print-content-wrapper {
    background-color: #fff5f7;
    border-color: #fdd9e0;
}

.mode-cart .sok-print-edit-btn {
    background-color: #b82647;
    border-color: #b82647;
    color: #fff;
}

.mode-cart .sok-print-edit-btn:hover {
    background-color: #a01f3d;
    border-color: #a01f3d;
}

/* Checkout 모드 (읽기 전용) */
.mode-checkout .sok-print-content-wrapper {
    background-color: #f8f9fa;
    border-style: dashed;
}

.mode-checkout .sok-print-edit-btn {
    display: none; /* checkout에서는 수정 버튼 숨김 */
}

/* Order 모드 */
.mode-order .sok-print-content-wrapper {
    background-color: #e8f4fd;
    border-color: #b8daff;
}

.mode-order .sok-print-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
}

/* Done 모드 (완료된 주문) */
.mode-done .sok-print-content-wrapper {
    background-color: #e8f5e9;
    border-color: #c3e6cb;
}

.mode-done .sok-print-edit-btn {
    display: none;
}

.mode-done .sok-print-preview {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

/* ===================================
   반응형 스타일
   =================================== */

/* 모바일 */
@media (max-width: 767px) {
    .sok-print-content-wrapper {
        padding: 10px;
        margin-top: 10px;
    }
    
    .sok-print-content-display {
        flex-direction: column;
        gap: 8px;
    }
    
    .sok-print-label {
        min-width: auto;
    }
    
    .sok-print-edit-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 태블릿 */
@media (min-width: 768px) and (max-width: 1023px) {
    .sok-print-content-wrapper {
        padding: 12px;
    }
}

/* ===================================
   장바구니 페이지 내 특별 스타일
   =================================== */

/* 장바구니 상품 카드 내부의 인쇄 내용 */
.sok-cart-items-info .sok-print-content-wrapper {
    margin-top: 8px;
    padding: 10px;
    font-size: 13px;
}

.sok-cart-items-info .sok-print-label {
    font-size: 13px;
    min-width: 70px;
}

.sok-cart-items-info .sok-print-text {
    font-size: 13px;
}

.sok-cart-items-info .sok-print-edit-btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* ===================================
   애니메이션
   =================================== */

.sok-print-content-wrapper {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 저장 성공 시 하이라이트 효과 */
.sok-print-content-wrapper.saved {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0%, 100% {
        background-color: inherit;
    }
    50% {
        background-color: #d4edda;
    }
}