/**
 * Orchard Gift Hub - Pilot Test Stylesheet
 * Brand Color Palette: Primary Pink #e91e63, Secondary Rose #ec4899, Border #f472b6
 */

/* 1. Tự động ẩn WAPF cũ trên tất cả trang sản phẩm áp dụng Quà tặng */
body.postid-248950 .wapf-wrapper,
body.postid-248950 .wapf-field-group,
body.postid-248950 div[class*="wapf-"],
body.orchard-test-gift-active .wapf-wrapper,
body.orchard-test-gift-active .wapf-field-group,
body.orchard-test-gift-active div[class*="wapf-"],
body.orchard-gift-active .wapf-wrapper,
body.orchard-gift-active .wapf-field-group,
body.orchard-gift-active div[class*="wapf-"] {
    display: none !important;
}

/* 2. Container Hộp Quà Tặng Mới */
.orchard-gift-box-wrapper {
    margin: 18px 0 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
}

.orchard-gift-title-heading {
    color: #e91e63;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.orchard-gift-banner {
    background: linear-gradient(135deg, #e91e63 0%, #db2777 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.2px;
}

.orchard-gift-badge {
    background: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.orchard-gift-content {
    background: #ffffff;
    border: 1.5px solid #f472b6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 12px 14px;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.06);
}

.orchard-gift-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* 3. Từng Item quà tặng */
.orchard-gift-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.orchard-gift-item:hover {
    background: #fff5f8;
    border-color: #fbcfe8;
    transform: translateY(-1px);
}

.orchard-gift-item.selected {
    background: #fff1f5;
    border-color: #e91e63;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.12);
}

/* Radio button tùy chỉnh */
.orchard-gift-radio-box {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #fff;
}

.orchard-gift-item.selected .orchard-gift-radio-box {
    border-color: #e91e63;
    background: #e91e63;
}

.orchard-gift-item.selected .orchard-gift-radio-box::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
}

/* Ảnh chai chiết */
.orchard-gift-thumb {
    width: 44px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.orchard-gift-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.orchard-gift-item:hover .orchard-gift-thumb img {
    transform: scale(1.08);
}

/* Thông tin chi tiết món quà */
.orchard-gift-info {
    flex-grow: 1;
    min-width: 0;
}

.orchard-gift-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1.35;
}

.orchard-gift-meta {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.orchard-gift-price-val {
    color: #db2777;
    font-weight: 700;
}

.orchard-gift-view-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    font-style: italic;
    cursor: pointer;
}

.orchard-gift-view-link:hover {
    text-decoration: underline;
}

/* 4. Tùy chọn thứ 5: Nhờ tư vấn */
.orchard-gift-item-advise {
    border-style: dashed;
    background: #f8fafc;
}

.orchard-gift-advise-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #e0f2fe;
    border-radius: 6px;
    color: #0284c7;
}

.orchard-gift-item-advise.selected {
    background: #f0fdf4;
    border-color: #16a34a;
}

.orchard-gift-item-advise.selected .orchard-gift-radio-box {
    border-color: #16a34a;
    background: #16a34a;
}

/* 5. Ghi chú chân trang */
.orchard-gift-footer-note {
    font-size: 12px;
    font-style: italic;
    color: #475569;
    margin: 8px 0 0 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 6. Hiệu ứng Rung khi chưa chọn quà (Shake validation) */
@keyframes orchardShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.orchard-gift-shake {
    animation: orchardShake 0.45s ease-in-out;
    border-color: #ef4444 !important;
}

.orchard-gift-error-msg {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: none;
}

.orchard-gift-error-msg.visible {
    display: block;
}

/* 7. Hiển thị trong giỏ hàng và thanh toán */
.orchard-cart-gift-badge {
    display: inline-block;
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    margin-top: 3px;
}
