/**
 * Mini cart — fly-in paneel
 *
 * @package DarkshopCart
 */

/* ── Overlay ──────────────────────────────────────── */
.dsc-mini__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.dsc-mini__overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ── Panel ────────────────────────────────────────── */
.dsc-mini {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
}

.dsc-mini[aria-hidden="false"] {
    transform: translateX(0);
}

/* ── Header ───────────────────────────────────────── */
.dsc-mini__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.dsc-mini__title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.dsc-mini__count {
    font-weight: 400;
    color: #999;
    font-size: 14px;
    margin-left: 4px;
}

.dsc-mini__close {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
    transition: all 0.2s;
}

.dsc-mini__close:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* ── Shipping bar ─────────────────────────────────── */
.dsc-mini__shipping {
    padding: 10px 20px;
    font-size: 13px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.dsc-mini__ship-ok {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4CAF50;
    font-weight: 600;
}

.dsc-mini__ship-msg {
    color: #333;
}

.dsc-mini__ship-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.dsc-mini__ship-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 2px;
    transition: width 0.3s;
}

/* ── Items ────────────────────────────────────────── */
.dsc-mini__items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
}

.dsc-mini__empty {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.dsc-mini__empty p {
    font-size: 15px;
    margin-bottom: 16px;
}

.dsc-mini__shop-link {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    text-decoration: none;
}

.dsc-mini.is-empty .dsc-mini__empty {
    display: block;
}

.dsc-mini.is-empty .dsc-mini__footer {
    display: none;
}

/* ── Item ─────────────────────────────────────────── */
.dsc-mini__item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.3s;
}

.dsc-mini__item.removing {
    opacity: 0;
}

.dsc-mini__item-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.dsc-mini__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dsc-mini__item-info {
    flex: 1;
    min-width: 0;
}

.dsc-mini__item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsc-mini__item-name a {
    color: inherit;
    text-decoration: none;
}

.dsc-mini__item-meta {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.dsc-mini__item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dsc-mini__item-price {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.dsc-mini__item-price del {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.dsc-mini__item-price ins {
    text-decoration: none;
}

.dsc-mini__item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Qty control */
.dsc-mini__qty {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.dsc-mini__qb {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #1a1a1a;
    transition: background 0.15s;
}

.dsc-mini__qb:hover {
    background: #f5f5f5;
}

.dsc-mini__qn {
    width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

/* Remove */
.dsc-mini__remove {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.dsc-mini__remove:hover {
    color: #d32f2f;
}

/* ── Footer ───────────────────────────────────────── */
.dsc-mini__footer {
    flex-shrink: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.dsc-mini__totals {
    margin-bottom: 14px;
}

.dsc-mini__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #1a1a1a;
}

.dsc-mini__total-row strong {
    font-weight: 800;
}

.dsc-mini__checkout {
    display: block;
    width: 100%;
    padding: 16px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.dsc-mini__checkout:hover {
    background: #43A047;
    color: #fff;
}

.dsc-mini__cart-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    margin-bottom: 14px;
    transition: color 0.2s;
}

.dsc-mini__cart-link:hover {
    color: #1a1a1a;
}

/* USPs */
.dsc-mini__usps {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
}

.dsc-mini__usp {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dsc-mini__usp svg {
    flex-shrink: 0;
    stroke: #999;
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
    .dsc-mini {
        width: 100vw;
        max-width: 100vw;
    }
}
