/* ========================================
   CC Custom Order - Frontend Styles
   ======================================== */

/* 가격 대체 텍스트 */
.cc-custom-order-price {
    display: inline-block;
    background: linear-gradient(135deg, #1a2a4a, #2c3e6b);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 상품 목록 배지 */
.cc-custom-order-badge {
    background: #1a2a4a !important;
    color: #fff !important;
    font-size: 11px !important;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* 안내 박스 */
.cc-custom-order-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0f4f8;
    border: 1px solid #d0d7de;
    border-left: 4px solid #1a2a4a;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

.cc-custom-order-notice > i {
    font-size: 24px;
    color: #1a2a4a;
    flex-shrink: 0;
    margin-top: 2px;
}

.cc-custom-order-notice strong {
    display: block;
    margin-bottom: 4px;
    color: #1a2a4a;
}

.cc-custom-order-notice p {
    margin: 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}

/* 주문 요청 버튼 */
.cc-custom-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a2a4a !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    justify-content: center;
}

.cc-custom-order-btn:hover {
    background: #2c3e6b !important;
    transform: translateY(-1px);
}

/* ========================================
   모달
   ======================================== */

.cc-custom-order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-custom-order-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.cc-custom-order-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: ccModalIn 0.25s ease-out;
}

@keyframes ccModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cc-custom-order-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

.cc-custom-order-modal-close:hover {
    color: #333;
}

.cc-custom-order-modal-content h3 {
    margin: 0 0 4px;
    font-size: 1.3em;
    color: #1a2a4a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-custom-order-modal-product {
    color: #666;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
}

/* 폼 */
.cc-form-row {
    margin-bottom: 16px;
}

.cc-form-row label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.cc-form-row label .required {
    color: #d9534f;
}

.cc-form-row input,
.cc-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 0.95em;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cc-form-row input:focus,
.cc-form-row textarea:focus {
    outline: none;
    border-color: #1a2a4a;
    box-shadow: 0 0 0 2px rgba(26, 42, 74, 0.1);
}

.cc-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cc-form-actions {
    margin-top: 20px;
}

.cc-form-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a2a4a !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: background 0.2s;
}

.cc-form-actions .button:hover {
    background: #2c3e6b !important;
}

.cc-form-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 결과 메시지 */
.cc-custom-order-result {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
}

.cc-custom-order-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cc-custom-order-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 모바일 */
@media (max-width: 480px) {
    .cc-custom-order-modal-content {
        padding: 20px;
        width: 95%;
    }

    .cc-form-row-half {
        grid-template-columns: 1fr;
    }
}
