/**
 * Стилі попапу для кошика
 * Використовується для відображення вмісту коробки в кошику
 */

/* ============================================
   Cart Popup Styles
   ============================================ */

/* Wrapper для коробки в кошику */
.wbc-cart-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Кнопка показати вміст */
.wbc-cart-show-contents {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #000;
    border: none;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
    font-size: 0.675rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    margin-top: 0.25rem;
}

.wbc-cart-show-contents:hover {
    background: var(--global-palette2, #005177);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wbc-cart-show-contents:active {
    transform: translateY(0);
}

.wbc-cart-show-contents .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}
.popup-drawer.active .drawer-overlay:hover{
    cursor: auto;
}
/* Overlay попапу */
.wbc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wbc-fadeIn 0.3s ease;
}

/* Прихований попап */
.wbc-popup-overlay.wbc-popup-hidden {
    display: none !important;
}

@keyframes wbc-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Контент попапу */
.wbc-popup-content {
    background: var(--global-palette9, #fff);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: wbc-slideUp 0.3s ease;
}

@keyframes wbc-slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header попапу */
.wbc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid var(--global-gray-400, #e2e8f0);
}

.wbc-popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--global-palette3, #1a202c);
}

/* Кнопка закриття */
.wbc-popup-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.wbc-popup-close:hover {
    background: var(--global-gray-400, #e2e8f0);
}

.wbc-popup-close .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: var(--global-palette5, #4a5568);
}

/* Body попапу */
.wbc-popup-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Таблиця товарів */
.wbc-products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--global-palette9, #fff);
}

.wbc-products-table thead {
    background: var(--global-palette7, #f9fafb);
    border-bottom: 2px solid var(--global-palette1, #0073aa);
}

.wbc-products-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--global-palette3, #1a202c);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wbc-products-table tbody tr {
    border-bottom: 1px solid var(--global-gray-400, #e2e8f0);
    transition: background-color 0.2s ease;
}

.wbc-products-table tbody tr:hover {
    background: var(--global-palette7, #f9fafb);
}

.wbc-products-table tbody tr:last-child {
    border-bottom: none;
}

.wbc-products-table td {
    padding: 1rem;
    font-size: 0.9375rem;
    color: var(--global-palette5, #4a5568);
}

.wbc-products-table td:first-child {
    font-weight: 500;
}

.wbc-products-table td:last-child {
    text-align: center;
    font-weight: 600;
    color: var(--global-palette1, #0073aa);
    min-width: 100px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .wbc-popup-content {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .wbc-popup-header {
        padding: 1rem;
    }
    
    .wbc-popup-header h3 {
        font-size: 1.125rem;
    }
    
    .wbc-popup-body {
        padding: 1rem;
    }
    
    .wbc-cart-show-contents {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
    
    .wbc-products-table th,
    .wbc-products-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .wbc-products-table th {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .wbc-popup-overlay {
        padding: 10px;
    }
    
    .wbc-products-table th,
    .wbc-products-table td {
        padding: 0.625rem 0.375rem;
        font-size: 0.8125rem;
    }
}

/* ============================================
   Приховування в міні-кошику
   ============================================ */

/* Блокування прокрутки body коли попап відкритий */
body.wbc-popup-open {
    overflow: hidden;
}
