/* ==========================================================================
   MWD Quick Contact - Public CSS
   ========================================================================== */

/* --- WRAPPER (Container) --- */
.mwd-qc-wrapper {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999; /* Maximaler Layer, damit es über allem liegt */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mwd-qc-wrapper.pos-left { 
    left: 0; 
    align-items: flex-start; 
}

.mwd-qc-wrapper.pos-right { 
    right: 0; 
    align-items: flex-end; 
}

/* --- EINZELNES ELEMENT (Link) --- */
.mwd-qc-item {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    padding: 15px;
    width: 50px; /* Basisbreite: Versteckt den Text, zeigt nur das Icon */
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    
    /* Standardfarben aus den Variablen laden (die im PHP übergeben werden) */
    background-color: var(--bg);
    color: var(--txt);
    
    /* Transition für Breite (Panel-Ausklappen) UND für die Hover-Farben */
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
                background-color 0.3s ease, 
                color 0.3s ease;
}

/* Anpassung, wenn Leiste rechts ist: Icon bleibt rechts, Text links daneben */
.mwd-qc-wrapper.pos-right .mwd-qc-item {
    justify-content: flex-end;
}

/* --- DAS GEMEINSAME AUSFAHREN --- */
/* Das Hover-Ereignis liegt auf dem Wrapper, damit alle Leisten gleichzeitig ausfahren */
.mwd-qc-wrapper:hover .mwd-qc-item {
    width: 250px; /* Die volle Breite im geöffneten Zustand */
}

/* --- INDIVIDUELLER ITEM-HOVER --- */
/* Wenn das spezifische Item gehovert wird, springen die Hover-Variablen ein */
.mwd-qc-item:hover {
    background-color: var(--h-bg) !important;
    color: var(--h-txt) !important;
}

/* --- ICON --- */
.mwd-qc-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}

/* --- TEXT --- */
.mwd-qc-text {
    white-space: nowrap;
    opacity: 0;
    font-weight: 600;
    margin: 0 15px;
    /* Versteckt den Text beim Schließen sofort */
    transition: opacity 0.2s ease;
}

/* Wenn das Panel ausklappt, wird der Text sanft eingeblendet */
.mwd-qc-wrapper:hover .mwd-qc-text {
    opacity: 1;
    transition-delay: 0.15s; /* Verzögerung, bis die Leiste ein Stück offen ist */
}