/* ==========================================================
   Drachenkompass Kundenkonto Button v1.0.7
   
   Gewuenschte Reihenfolge von oben nach unten:
     Warenkorb   (oben)   -> bottom: 214px
     Kasse       (mitte)  -> bottom: 122px
     Kundenkonto (unten)  -> bottom: 30px
   
   Da Warenkorb (bottom=30px) und Kasse (per JS top-basiert)
   bereits von anderen Plugins gesetzt werden, ueberschreiben
   wir deren Positionen hier via CSS-Override.
   ========================================================== */

/* --- Warenkorb-Button nach oben schieben --- */
#dkmc-cart-button-wrapper {
    bottom: 214px !important;
    top: auto !important;
}

/* --- Kasse-Button in die Mitte schieben --- */
#dkb-kasse-button-wrapper {
    bottom: 122px !important;
    top: auto !important;
}

/* --- Kundenkonto-Button ganz unten --- */
#dkckb-wrapper {
    position: fixed;
    right: 20px;
    bottom: 30px;
    top: auto;
    z-index: 99990;
    width: 80px;
    height: 80px;
    -webkit-animation: dkckb-slide-in 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.8s both;
    animation: dkckb-slide-in 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.8s both;
}

/* --- Button-Stil (gleich wie Kasse- und Warenkorb-Button) --- */
.dkckb-btn {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #f0f0f0;
    -webkit-box-shadow: 0 4px 15px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.15);
    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;
    cursor: pointer;
    -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
}

.dkckb-btn:hover {
    -webkit-transform: scale(1.12) rotate(-5deg);
    -ms-transform: scale(1.12) rotate(-5deg);
    transform: scale(1.12) rotate(-5deg);
    -webkit-box-shadow: 0 8px 25px rgba(0,0,0,0.30), 0 4px 10px rgba(0,0,0,0.20);
    box-shadow: 0 8px 25px rgba(0,0,0,0.30), 0 4px 10px rgba(0,0,0,0.20);
    border-color: #4CAF50;
    text-decoration: none;
}

.dkckb-btn:active {
    -webkit-transform: scale(0.95);
    -ms-transform: scale(0.95);
    transform: scale(0.95);
}

/* --- Drachenbild --- */
.dkckb-img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    pointer-events: none;
}

/* --- Hover-Tooltip --- */
.dkckb-label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    -webkit-transform: translateY(-50%) translateX(6px);
    -ms-transform: translateY(-50%) translateX(6px);
    transform: translateY(-50%) translateX(6px);
    background: rgba(30,30,30,0.88);
    color: #fff;
    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;
    -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
    transition: opacity 0.2s ease, transform 0.2s ease;
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.dkckb-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right: none;
    border-left-color: rgba(30,30,30,0.88);
}

.dkckb-btn:hover .dkckb-label {
    opacity: 1;
    -webkit-transform: translateY(-50%) translateX(0);
    -ms-transform: translateY(-50%) translateX(0);
    transform: translateY(-50%) translateX(0);
}

/* --- Einblend-Animation --- */
@-webkit-keyframes dkckb-slide-in {
    from { opacity: 0; -webkit-transform: translateX(60px); transform: translateX(60px); }
    to   { opacity: 1; -webkit-transform: translateX(0);    transform: translateX(0);    }
}
@keyframes dkckb-slide-in {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* --- Responsive (Mobile) --- */
@media (max-width: 480px) {
    #dkmc-cart-button-wrapper {
        bottom: 182px !important;
        top: auto !important;
    }
    #dkb-kasse-button-wrapper {
        bottom: 106px !important;
        top: auto !important;
    }
    #dkckb-wrapper {
        right: 12px;
        bottom: 18px;
        width: 64px;
        height: 64px;
    }
    .dkckb-btn {
        width: 64px;
        height: 64px;
    }
}
