/* Billboard Header Cart Styles */

/* Cart Menu Item */
.billboard-cart-menu-item {
    position: relative;
}

.billboard-cart-trigger {
    display: flex !important;
    align-items: center;
    gap: 5px;
    position: relative;
    text-decoration: none !important;
}

.billboard-cart-trigger:hover {
    text-decoration: none !important;
}

.billboard-cart-trigger .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.billboard-cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
}

.billboard-cart-total {
    font-size: 12px;
    opacity: 0.8;
}

/* Cart Panel */
.billboard-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.billboard-cart-panel.active {
    visibility: visible;
    opacity: 1;
}

.billboard-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.billboard-cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.billboard-cart-panel.active .billboard-cart-content {
    transform: translateX(0);
}

/* Cart Header */
.billboard-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.billboard-cart-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.billboard-cart-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    font-size: 18px;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.billboard-cart-close:hover {
    background: #e9ecef;
    color: #dc3545;
}

.billboard-cart-close .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Cart Body */
.billboard-cart-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.billboard-cart-loading,
.billboard-cart-empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.billboard-cart-empty p {
    margin: 0 0 10px 0;
}

.billboard-cart-empty p:last-child {
    margin-bottom: 0;
    font-style: italic;
}

/* Cart Table */
.billboard-cart-table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.billboard-cart-table th,
.billboard-cart-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
    vertical-align: top;
}

.billboard-cart-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.billboard-cart-table tbody tr:hover {
    background: #f8f9fa;
}

.billboard-cart-period {
    font-size: 13px;
}

.period-dates {
    margin-bottom: 5px;
}

.period-duration {
    color: #666;
    font-style: italic;
}

.billboard-remove-item {
    padding: 4px 8px !important;
    min-height: auto !important;
    line-height: 1 !important;
}

.billboard-remove-item .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.billboard-remove-item:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* Cart Footer */
.billboard-cart-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
}

.billboard-cart-summary {
    margin-bottom: 15px;
}

.billboard-cart-summary table {
    margin: 0;
}

.billboard-cart-summary td {
    padding: 8px 12px;
    border: none;
}

.billboard-cart-summary .billboard-cart-total-amount {
    text-align: right;
    font-size: 16px;
}

.billboard-cart-actions {
    display: flex;
    gap: 10px;
}

.billboard-cart-actions .button {
    flex: 1;
    text-align: center;
    justify-content: center;
}

.billboard-clear-cart {
    background: #f0f0f1 !important;
    border-color: #dcdcde !important;
    color: #50575e !important;
}

.billboard-clear-cart:hover {
    background: #e9ecef !important;
    border-color: #c3c4c7 !important;
    color: #dc3545 !important;
}

.billboard-proceed-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .billboard-cart-content {
        max-width: 100%;
        width: 100%;
    }
    
    .billboard-cart-header {
        padding: 15px;
    }
    
    .billboard-cart-body {
        padding: 15px;
    }
    
    .billboard-cart-footer {
        padding: 15px;
    }
    
    .billboard-cart-table th,
    .billboard-cart-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .billboard-cart-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .billboard-cart-table {
        font-size: 12px;
    }
    
    .billboard-cart-table th:nth-child(3),
    .billboard-cart-table td:nth-child(3) {
        display: none;
    }
    
    .billboard-cart-table th:nth-child(2),
    .billboard-cart-table td:nth-child(2) {
        font-size: 11px;
    }
}

/* Animation for cart count badge */
.billboard-cart-count {
    animation: none;
}

.billboard-cart-count.updated {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* WordPress Admin Bar Compatibility */
.admin-bar .billboard-cart-panel {
    top: 32px;
    height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .billboard-cart-panel {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/* Custom scrollbar for cart body */
.billboard-cart-body::-webkit-scrollbar {
    width: 8px;
}

.billboard-cart-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.billboard-cart-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.billboard-cart-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 