/**
 * Drachenkompass Mini-Warenkorb – Stylesheet
 * Version: 1.0.0
 */

/* ===========================
   Wrapper – fixiert rechts
   =========================== */
#dkmc-cart-button-wrapper {
    position: fixed;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===========================
   Runder Button
   =========================== */
.dkmc-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    cursor: pointer;
    border: 3px solid #f0f0f0;
    outline: none;
}

/* Hover-Effekt */
.dkmc-cart-button:hover {
    transform: scale(1.12) rotate(-5deg);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.30),
        0 4px 10px rgba(0, 0, 0, 0.20);
    border-color: #4CAF50;
}

/* Klick-Effekt */
.dkmc-cart-button:active {
    transform: scale(0.95);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.20);
}

/* Fokus-Stil für Barrierefreiheit */
.dkmc-cart-button:focus-visible {
    outline: 3px solid #4CAF50;
    outline-offset: 3px;
}

/* ===========================
   Drachenbild
   =========================== */
.dkmc-dragon-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===========================
   Artikel-Zähler-Badge
   =========================== */
.dkmc-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 20px;
    text-align: center;
    display: none;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.5);
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Badge nur anzeigen wenn Artikel vorhanden */
.dkmc-cart-count.dkmc-has-items {
    display: block;
}

/* Badge-Puls-Animation bei Aktualisierung */
.dkmc-cart-count.dkmc-updated {
    animation: dkmc-pulse 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ===========================
   Tooltip
   =========================== */
.dkmc-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.88);
    color: #ffffff;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(-50%) translateX(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Tooltip-Pfeil */
.dkmc-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right: none;
    border-left-color: rgba(30, 30, 30, 0.88);
}

/* Tooltip bei Hover anzeigen */
#dkmc-cart-button-wrapper:hover .dkmc-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ===========================
   Einblend-Animation beim Laden
   =========================== */
#dkmc-cart-button-wrapper {
    animation: dkmc-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

@keyframes dkmc-slide-in {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================
   Responsive – Mobile
   =========================== */
@media screen and (max-width: 480px) {
    #dkmc-cart-button-wrapper {
        right: 12px;
        width: 64px !important;
        height: 64px !important;
    }
}
