/* Domain R16 TailwindCSS 호환 스타일 */

/* 모드 전환 (등록/이전) */
.mode {
    display: none;
}

.transfer .mode-transfer {
    display: initial;
}

.register .mode-register {
    display: initial;
}

/* 기본 초기화 */
#orderpage * {
    box-sizing: border-box;
}

/* 결과 행에서 장바구니 상태 */
#orderpage .result-row .result-incart {
    display: none;
}

#orderpage .result-row.active .result-button:not(.result-cart) {
    display: none;
}

#orderpage .result-row.active .result-incart {
    display: flex;
}

/* 도메인 주문 버튼 표시 조건 */
#orderpage .domain-order.hidden {
    display: none;
}

#orderpage .domain-order:not(.hidden) {
    display: block;
}

/* 반응형 미디어 쿼리 */
@media (min-width: 980px) {
    #orderpage .max {
        display: inline;
    }
    #orderpage .min,
    #orderpage .mid {
        display: none;
    }
}

@media (max-width: 979px) and (min-width: 481px) {
    #orderpage .mid {
        display: inline;
    }
    #orderpage .min,
    #orderpage .max {
        display: none;
    }
}

@media (max-width: 480px) {
    #orderpage .min {
        display: inline;
    }
    #orderpage .mid,
    #orderpage .max {
        display: none;
    }
}

/* 검색 결과가 비어있을 때 숨김 */
#orderpage .domain-search-results:empty {
    display: none;
}

/* 로딩 애니메이션 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 모달 스타일 (Bootstrap 호환) */
.modal.hide {
    display: none;
}

.modal.show,
.modal.in {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    overflow: auto;
}

.modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal .modal-header .close {
    font-size: 1.5rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}

.modal .modal-body {
    background: white;
    max-width: 600px;
    margin: 100px auto;
    border-radius: 12px;
    overflow: hidden;
}

/* 결과 SLD 기본 숨김 */
#orderpage .result-sld {
    display: none;
}

/* 가격표 스크롤 높이 제한 */
#orderpage .price-view {
    max-height: 40vh;
    overflow: auto;
}

/* Spotlight 제품 호버 효과 */
.spotlight-product {
    cursor: pointer;
}

/* 반응형 모바일 최적화 */
@media (max-width: 640px) {
    #orderpage .domain-search-results .result-row {
        flex-direction: column;
    }

    #orderpage .domain-search-results .result-actions {
        width: 100%;
        justify-content: center;
    }
}
