/**
 * Easy Elements Pro — Mini Cart Panel Styles
 *
 * The Free plugin only ships styles for the cart icon, count badge and
 * toggle wrapper. Everything else (the dropdown / off-canvas / modal panel,
 * the items list, footer subtotal, view-cart and checkout buttons, the
 * empty-cart message, the modal overlay, loading state) is rendered by
 * the Pro extension and styled here.
 */

/* ---------------------------------------------------------- *
 *  Close button (offcanvas + modal panels only)
 * ---------------------------------------------------------- */
.eel-mini-cart-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #333333;
    cursor: pointer;
    line-height: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.eel-mini-cart-close:hover,
.eel-mini-cart-close:focus {
    background-color: rgba(0, 0, 0, 0.06);
    color: #000000;
    transform: rotate(90deg);
    outline: none;
}

.eel-mini-cart-close svg {
    display: block;
}

/* The dropdown variant relies on outside-click to close, so the explicit
   button is hidden defensively in case it ever ends up rendered there. */
.eel-mini-cart-dropdown .eel-mini-cart-close {
    display: none;
}

/* ---------------------------------------------------------- *
 *  Toggle subtotal label (Pro element rendered inside <a>)
 * ---------------------------------------------------------- */
.eel-toggle-subtotal {
    margin-left: 5px;
    font-weight: 600;
    font-size: 14px;
}

/* ---------------------------------------------------------- *
 *  Make the toggle clickable (we suppress nav in JS)
 * ---------------------------------------------------------- */
.eel-mini-cart-dropdown .eel-mini-cart-toggle,
.eel-mini-cart-offcanvas .eel-mini-cart-toggle,
.eel-mini-cart-modal .eel-mini-cart-toggle {
    cursor: pointer;
}

/* ---------------------------------------------------------- *
 *  Variant 1 — Dropdown panel
 * ---------------------------------------------------------- */
.eel-mini-cart-dropdown .eel-mini-cart-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 380px;
    max-width: 400px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0;
}

.eel-mini-cart-dropdown:hover .eel-mini-cart-content,
.eel-mini-cart-dropdown.active .eel-mini-cart-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.eel-mini-cart-dropdown a.remove {
    line-height: 18px;
}

/* ---------------------------------------------------------- *
 *  Variant 2 — Off-canvas panel
 * ---------------------------------------------------------- */
.eel-mini-cart-offcanvas .eel-mini-cart-content {
    position: fixed;
    top: 0;
    right: -110vw;
    width: 350px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: right 0.3s ease;
    padding: 56px 20px 20px;  /* extra top room for the close button */
    overflow-y: auto;
}

.eel-mini-cart-offcanvas.active .eel-mini-cart-content {
    right: 0;
}

.eel-mini-cart-offcanvas .eel-cart-items {
    max-height: 100%;
}

/* ---------------------------------------------------------- *
 *  Variant 3 — Modal panel
 * ---------------------------------------------------------- */
.eel-mini-cart-modal .eel-mini-cart-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    min-width: 700px;
    max-width: 95vw;
    max-height: 100vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 56px 20px 20px;  /* extra top room for the close button */
    overflow-y: auto;
}

.eel-mini-cart-modal .eel-cart-items {
    max-height: 400px;
}

.eel-mini-cart-modal.active .eel-mini-cart-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ---------------------------------------------------------- *
 *  Items list
 * ---------------------------------------------------------- */
.eel-cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.eel-cart-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.eel-cart-item:last-child {
    border-bottom: none;
}

.eel-item-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.eel-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.eel-item-details {
    flex: 1;
    min-width: 0;
}

.eel-item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.eel-item-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.eel-item-title a:hover {
    color: #007cba;
}

.eel-item-price {
    font-size: 13px;
    color: #666666;
    margin-bottom: 2px;
}

.eel-item-quantity {
    font-size: 12px;
    color: #999999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eel-item-quantity .eel-qty-btn {
    background: none;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    width: 20px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 10px;
    color: #666666;
    transition: all 0.2s ease;
}

.eel-item-quantity .eel-qty-btn svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.eel-item-quantity .eel-qty-btn:hover {
    border-color: #629d23;
    color: #629d23;
}

.eel-item-quantity .quantity {
    min-width: 16px;
    text-align: center;
}

/* ---------------------------------------------------------- *
 *  Remove button
 * ---------------------------------------------------------- */
.eel-item-remove {
    margin-left: 10px;
}

body .eel-mini-cart-inner .eel-item-remove .remove {
    display: grid;
    place-content: center;
    width: 22px;
    height: 22px;
    padding:0 0 3px;
    line-height: .9;
    background-color: #f5f5f5;
    color: #ff0000;
    text-decoration: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body .eel-mini-cart-inner .eel-item-remove .remove:hover {
    background-color: #ff0000;
    color: #ffffff;
}

/* ---------------------------------------------------------- *
 *  Footer / Subtotal / Buttons
 * ---------------------------------------------------------- */
.eel-cart-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px;
}

.eel-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.eel-cart-buttons {
    display: flex;
    gap: 10px;
}

.eel-cart-button {
    flex: 1;
    display: inline-block;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.eel-view-cart-button {
    background-color: #f5f5f5;
    color: #333333;
    border: 1px solid #e0e0e0;
}

.eel-view-cart-button:hover {
    background-color: #e0e0e0;
}

.eel-checkout-button {
    background-color: #007cba;
    color: #ffffff;
    border: 1px solid #007cba;
}

.eel-checkout-button:hover {
    background-color: #005a87;
}

/* ---------------------------------------------------------- *
 *  Empty cart
 * ---------------------------------------------------------- */
.eel-empty-cart {
    padding: 40px 20px;
    text-align: center;
    color: #666666;
    font-size: 16px;
}

/* ---------------------------------------------------------- *
 *  Loading state
 * ---------------------------------------------------------- */
.eel-mini-cart-loading {
    opacity: 0.7;
    pointer-events: none;
}

.eel-mini-cart-loading .eel-mini-cart-icon::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: eelMiniCartSpin 1s linear infinite;
}

@keyframes eelMiniCartSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------------------------------------------------------- *
 *  Modal overlay
 * ---------------------------------------------------------- */
.eel-mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.eel-mini-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------- *
 *  Responsive
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
    .eel-mini-cart-dropdown .eel-mini-cart-content {
        min-width: 280px;
        max-width: 90vw;
        right: -10px;
    }
    .eel-mini-cart-offcanvas .eel-mini-cart-content {
        width: 300px;
    }
    .eel-mini-cart-modal .eel-mini-cart-content {
        min-width: 320px;
        padding: 15px;
    }
    .eel-cart-item {
        padding: 12px;
    }
    .eel-item-image {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    .eel-cart-buttons {
        flex-direction: column;
    }
    .eel-cart-button {
        margin-bottom: 8px;
    }
}
