/* ============================================================================
   주문 상세 페이지 공통 CSS — LP 강의 주문 + WC 상품 주문 양쪽에서 사용
   - 블랙 테마 (#161616 / #2a2a2a / #ffffff)
   - 메인 페이지 톤(--color-primary: #C9A86A)과 통일
   ============================================================================ */

.order-details-shop-style {
    max-width: 700px;
    margin: 0 auto;
    color: #ffffff;
}

.order-details-shop-style .order-header {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.order-details-shop-style .order-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.lp-profile-content #profile-content-order-details h3,
.lp-profile-content #profile-content-woo-orders h3.order-detail-title,
.order-details-shop-style .order-title {
    margin-top: 0;
    font-size: 24px;
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 0;
    color: #ffffff;
}

/* 상태 배지 */
.order-details-shop-style .order-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.order-details-shop-style .order-status-badge.status-completed,
.order-details-shop-style .order-status-badge.status-delivered { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.order-details-shop-style .order-status-badge.status-pending { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.order-details-shop-style .order-status-badge.status-processing { background: rgba(33, 150, 243, 0.2); color: #2196f3; }
.order-details-shop-style .order-status-badge.status-on-hold { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.order-details-shop-style .order-status-badge.status-cancelled,
.order-details-shop-style .order-status-badge.status-refunded,
.order-details-shop-style .order-status-badge.status-failed { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.order-details-shop-style .order-status-badge.status-awaiting-vbank { background: rgba(255, 152, 0, 0.2); color: #ff9800; }
.order-details-shop-style .order-status-badge.status-pre-shipping { background: rgba(156, 39, 176, 0.2); color: #9c27b0; }
.order-details-shop-style .order-status-badge.status-shipping { background: rgba(0, 150, 136, 0.2); color: #009688; }
.order-details-shop-style .order-status-badge.status-request-refund,
.order-details-shop-style .order-status-badge.status-request-exchange { background: rgba(233, 30, 99, 0.2); color: #e91e63; }

/* 메타 정보 그리드 */
.order-details-shop-style .order-meta-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.order-details-shop-style .order-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-details-shop-style .order-meta-item.full-width,
.order-details-shop-style .order-meta-item.order-note-item {
    grid-column: 1 / -1;
    background: #0a0a0a;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.order-details-shop-style .order-meta-label {
    font-size: 13px;
    color: #999999;
    font-weight: 400;
}

.order-details-shop-style .order-meta-value {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
}

/* 액션 버튼(주문에서 들어가는 별도 페이지 등) */
.order-details-shop-style .order-actions-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.order-details-shop-style .order-action-button {
    padding: 12px 24px;
    background: rgba(201, 168, 106, 0.1);
    color: #C9A86A;
    text-decoration: none;
    border: 1px solid rgba(201, 168, 106, 0.3);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.order-details-shop-style .order-action-button:hover {
    background: rgba(201, 168, 106, 0.2);
    border-color: #C9A86A;
    transform: translateY(-1px);
}
.order-details-shop-style .order-action-button::after {
    content: '→';
    font-size: 16px;
}

/* 상품 섹션 */
.order-details-shop-style .order-items-section {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.order-details-shop-style .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
}

.order-details-shop-style .order-item,
.order-details-shop-style .detail-order-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #2a2a2a;
}
.order-details-shop-style .order-item:first-child,
.order-details-shop-style .detail-order-item:first-child { padding-top: 0; }
.order-details-shop-style .order-item:last-child,
.order-details-shop-style .detail-order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-details-shop-style .item-thumbnail,
.order-details-shop-style .detail-item-thumbnail {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
}

.order-details-shop-style .item-thumbnail img,
.order-details-shop-style .detail-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-details-shop-style .item-thumbnail.no-image,
.order-details-shop-style .detail-item-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.order-details-shop-style .item-details,
.order-details-shop-style .detail-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-details-shop-style .item-name,
.order-details-shop-style .detail-item-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.4;
}
.order-details-shop-style .item-name a,
.order-details-shop-style .detail-item-name a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}
.order-details-shop-style .item-name a:hover,
.order-details-shop-style .detail-item-name a:hover {
    color: #C9A86A;
}

.order-details-shop-style .item-price-section,
.order-details-shop-style .detail-item-price-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.order-details-shop-style .item-original-price,
.order-details-shop-style .detail-item-original-price {
    text-decoration: line-through;
    color: #666666;
    font-size: 14px;
}

.order-details-shop-style .item-price,
.order-details-shop-style .detail-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* 배송 정보 */
.order-details-shop-style .delivery-section-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 15px;
    color: #c9c9c9;
}

.order-details-shop-style .delivery-track-btn {
    padding: 6px 14px;
    background: rgba(201, 168, 106, 0.1);
    color: #C9A86A !important;
    border: 1px solid rgba(201, 168, 106, 0.3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s;
}
.order-details-shop-style .delivery-track-btn:hover {
    background: rgba(201, 168, 106, 0.2);
    border-color: #C9A86A;
}

/* 결제 합계 */
.order-details-shop-style .order-summary,
.order-details-shop-style .order-summary-section {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px;
}

.order-details-shop-style .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}
.order-details-shop-style .summary-row .summary-label-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.order-details-shop-style .summary-row:first-child,
.order-details-shop-style .summary-row:first-of-type { padding-top: 0; }
.order-details-shop-style .summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 10px;
    padding-top: 20px;
}

.order-details-shop-style .summary-label {
    font-size: 14px;
    color: #999999;
}
.order-details-shop-style .summary-value {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
}
.order-details-shop-style .summary-row:last-child .summary-label {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
}
.order-details-shop-style .summary-row:last-child .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

/* 뒤로가기 링크 */
.order-details-shop-style .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #999999;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.order-details-shop-style .back-link:hover { color: #C9A86A; }

/* 환불/교환 섹션 (포인트 색상 톤 적용) */
.order-details-shop-style .order-section {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    color: #ffffff;
}
.order-details-shop-style .order-section h4.section-title,
.order-details-shop-style .order-section .section-title {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 15px;
}
.order-details-shop-style .refund-condition-notice,
.order-details-shop-style .refund-condition-list {
    color: #c9c9c9;
    font-size: 13px;
    line-height: 1.7;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0 0 16px;
}
.order-details-shop-style .refund-condition-list { list-style: none; padding: 12px 16px; }
.order-details-shop-style .refund-condition-list li { margin: 6px 0; }
.order-details-shop-style .refund-notice-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}
.order-details-shop-style .refund-notice-tag--course {
    background: rgba(201, 168, 106, 0.1);
    color: #C9A86A;
    border: 1px solid rgba(201, 168, 106, 0.3);
}
.order-details-shop-style .refund-notice-tag--product {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}
.order-details-shop-style .refund-action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.order-details-shop-style .academy-refund-request-btn {
    padding: 10px 20px;
    background: rgba(201, 168, 106, 0.1);
    color: #C9A86A;
    border: 1px solid rgba(201, 168, 106, 0.3);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.order-details-shop-style .academy-refund-request-btn:hover {
    background: rgba(201, 168, 106, 0.2);
    border-color: #C9A86A;
}
.order-details-shop-style .academy-refund-request-btn.academy-exchange-btn {
    background: transparent;
    color: #c9c9c9;
    border-color: #3a3a3a;
}
.order-details-shop-style .academy-refund-request-btn.academy-exchange-btn:hover {
    background: rgba(255,255,255,0.04);
    color: #ffffff;
    border-color: #555;
}
.order-details-shop-style .academy-withdraw-btn {
    background: transparent;
    color: #999;
    border-color: #3a3a3a;
}
.order-details-shop-style .refund-status-msg,
.order-details-shop-style .refund-expired-notice {
    color: #c9c9c9;
    margin: 0 0 12px;
}
.order-details-shop-style .refund-status-msg--pending { color: #ffc107; }

/* 반응형 */
@media (max-width: 768px) {
    .order-details-shop-style .order-header,
    .order-details-shop-style .order-items-section,
    .order-details-shop-style .order-summary,
    .order-details-shop-style .order-summary-section,
    .order-details-shop-style .order-section {
        padding: 20px;
    }

    .order-details-shop-style .order-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .order-details-shop-style .order-meta-info {
        grid-template-columns: 1fr;
    }

    .order-details-shop-style .order-item,
    .order-details-shop-style .detail-order-item {
        flex-direction: column;
    }

    .order-details-shop-style .item-thumbnail,
    .order-details-shop-style .detail-item-thumbnail {
        width: 100%;
        height: 200px;
    }

    .order-details-shop-style .item-price-section,
    .order-details-shop-style .detail-item-price-section {
        align-items: flex-start;
    }
}

/* ============================================================================
   환불/교환 요청 모달 — 블랙 톤
   ============================================================================ */
.academy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.academy-modal-overlay.is-open { display: flex; }

.academy-modal-box {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 28px 28px 24px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.academy-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
}

.academy-modal-policy {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #c9c9c9;
    line-height: 1.7;
    margin-bottom: 16px;
}
.academy-modal-policy ul { margin: 6px 0 0; padding-left: 16px; }
.academy-modal-policy li { margin-bottom: 4px; }

.academy-modal-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #c9c9c9;
    margin-bottom: 6px;
}
.academy-modal-label .required { color: #e91e63; }

.academy-modal-textarea {
    width: 100%;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    color: #ffffff;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}
.academy-modal-textarea:focus { outline: none; border-color: #C9A86A; }
.academy-modal-textarea::placeholder { color: #555; }

.academy-modal-agree-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #c9c9c9;
    cursor: pointer;
    margin: 14px 0 20px;
    line-height: 1.5;
}
.academy-modal-agree-wrap input { margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: #C9A86A; }

.academy-modal-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.academy-modal-cancel {
    padding: 10px 20px;
    border: 1px solid #3a3a3a;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: #c9c9c9;
    transition: all 0.2s;
}
.academy-modal-cancel:hover {
    background: rgba(255,255,255,0.04);
    border-color: #555;
    color: #ffffff;
}
.academy-modal-submit {
    padding: 10px 24px;
    background: rgba(201, 168, 106, 0.1);
    color: #C9A86A;
    border: 1px solid rgba(201, 168, 106, 0.3);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, border-color 0.2s;
}
.academy-modal-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.academy-modal-submit:not(:disabled):hover {
    background: rgba(201, 168, 106, 0.2);
    border-color: #C9A86A;
}

/* 환불 금액 강조 */
.order-details-shop-style .summary-row.refund-row .summary-label,
.order-details-shop-style .summary-row.refund-row .refund-amount { color: #e91e63; }

@media (max-width: 768px) {
    .academy-modal-box { padding: 20px 18px; }
    .order-details-shop-style .refund-action-btns { flex-direction: column; }
    .order-details-shop-style .academy-refund-request-btn { width: 100%; text-align: center; }
}
