/**
 * Mini Cart Styles
 *
 * @package Divi_Woo_Mini_Cart
 * @author Shortcut Solutions LLC
 * @version 1.1.0
 */

/* Container */
.dwmc-mini-cart-container {
    position: relative;
    display: inline-block;
    z-index: 999999;
    font-family: 'Open Sans', sans-serif;
}

/* Cart Icon */
.dwmc-cart-icon-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dwmc-cart-icon-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dwmc-cart-icon {
    position: relative;
    margin-right: 10px;
}

.dwmc-cart-icon svg {
    width: 24px;
    height: 24px;
    color: #333333;
}

.dwmc-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #2ea3f2; /* Divi primary color */
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dwmc-cart-total {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

/* Dropdown */
.dwmc-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999999;
}

/* Show dropdown on hover */
.dwmc-mini-cart-container:hover .dwmc-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Cart Items */
.dwmc-cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
}

.dwmc-cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.dwmc-cart-item:last-child {
    border-bottom: none;
}

.dwmc-cart-item-thumbnail {
    width: 50px;
    margin-right: 10px;
}

.dwmc-cart-item-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.dwmc-cart-item-details {
    flex: 1;
}

.dwmc-cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.dwmc-cart-item-title a {
    color: #333333;
    text-decoration: none;
}

.dwmc-cart-item-title a:hover {
    color: #2ea3f2; /* Divi primary color */
}

.dwmc-cart-item-price-quantity {
    font-size: 12px;
    color: #666666;
}

.dwmc-cart-item-remove {
    margin-left: 10px;
}

.dwmc-remove-item {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #999999;
    transition: color 0.2s ease;
}

.dwmc-remove-item:hover {
    color: #e2401c; /* WooCommerce red */
}

.dwmc-more-items {
    text-align: center;
    font-size: 12px;
    color: #666666;
    padding: 5px 0;
}

/* Empty Cart */
.dwmc-empty-cart {
    padding: 20px;
    text-align: center;
    color: #666666;
}

/* Subtotal */
.dwmc-cart-subtotal {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #f1f1f1;
    font-size: 14px;
}

.dwmc-subtotal-label {
    font-weight: 600;
    color: #333333;
}

.dwmc-subtotal-amount {
    font-weight: 700;
    color: #333333;
}

/* Buttons */
.dwmc-cart-buttons {
    display: flex;
    padding: 0 15px 15px;
    gap: 10px;
}

.dwmc-view-cart-button,
.dwmc-checkout-button {
    flex: 1;
    display: inline-block;
    padding: 10px 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.dwmc-view-cart-button {
    background-color: #f1f1f1;
    color: #333333;
}

.dwmc-view-cart-button:hover {
    background-color: #e1e1e1;
}

.dwmc-checkout-button {
    background-color: #2ea3f2; /* Divi primary color */
    color: #ffffff;
}

.dwmc-checkout-button:hover {
    background-color: #0c71c3; /* Darker Divi color */
}

/* Responsive */
@media (max-width: 767px) {
    .dwmc-mini-cart-dropdown {
        width: 280px;
    }
}
