/**
 * bbp-merkliste-styles.css
 *
 * Stile für die Merklisten-Vergleichsseite des bb-preview Plugins.
 */

/* Wrapper für die gesamte Vergleichsseite */
.bbp-merkliste-vergleich-wrapper {
    margin-top: 20px;
    padding: 15px 0; 
    border-radius: 4px; 
    background-color: #fdfdfd; 
}

.bbp-merkliste-vergleich-wrapper h2,
.bbp-merkliste-vergleich-wrapper h3 {
    margin-top: 0.5em;
    margin-bottom: 0.8em;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    line-height: 1.2; 
}

.bbp-merkliste-vergleich-wrapper h2 {
    font-size: clamp(1.1rem, 3.2vw, 1.6rem); 
}

.bbp-merkliste-vergleich-wrapper h3 {
    font-size: clamp(1.0rem, 2.8vw, 1.4rem);
}


/* Tab-Umschalter */
.bbp-vergleich-tabs {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0; 
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
}

.bbp-vergleich-tab-button {
    padding: 10px 18px;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    flex-grow: 1; 
    text-align: center;
}

.bbp-vergleich-tab-button:hover {
    background-color: #e7e7e7;
    border-color: #bbb;
}

.bbp-vergleich-tab-button.active {
    background-color: #4a6a8a; 
    color: white;
    border-color: #3e5a78;
    font-weight: bold;
}

.bbp-vergleich-tab-button.bbp-tab-disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.7;
}
.bbp-vergleich-tab-button.bbp-tab-disabled:hover {
    background-color: #e9ecef; 
    border-color: #dee2e6;
}


/* Allgemeine Sektionen */
.bbp-vergleich-sektion {
    margin-bottom: 30px;
    padding-bottom: 20px;
}
.bbp-vergleich-sektion:not(:last-child) {
    border-bottom: 1px dashed #d0d0d0;
}


/* Layout für optische Kacheln - IMMER EINSPALTIG */
#bbp-vergleich-optisch.bbp-vergleich-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 20px; 
}

/* Styling für eine einzelne optische Kachel */
.bbp-merkliste-optisch-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px; 
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; 
}

.bbp-merkliste-optisch-item img.bbp-merkliste-preview-image-optisch {
    max-width: 100%; 
    width: auto; 
    max-height: 120px; 
    object-fit: contain;
    margin-bottom: 10px;
    background-color: #ffffff; 
    border: 1px solid #eee;
    align-self: center; 
}

.bbp-merkliste-optisch-item .bbp-merkliste-item-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
    text-align: center; 
}

.bbp-merkliste-optisch-item .bbp-merkliste-item-usertext {
    display: none; 
}

.bbp-merkliste-optisch-item-actions {
    margin-top: auto; 
    display: flex;
    gap: 8px; 
    justify-content: center; 
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

.bbp-merkliste-optisch-item-actions .bbp-merkliste-button-small,
.bbp-merkliste-optisch-item-actions .bbp-merkliste-ausblenden-btn, 
.bbp-merkliste-optisch-item-actions .bbp-merkliste-entfernen-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    flex-grow: 1; 
    min-width: 120px; 
    box-sizing: border-box; 
}
.bbp-merkliste-optisch-item-actions .bbp-merkliste-button-small .dashicons {
    font-size: 16px; 
    line-height: 1; 
}


/* Technische Detailansicht */
#bbp-vergleich-technisch .bbp-product-preview-item {
    margin-bottom: 25px; 
    padding-bottom: 25px; 
    border: 1px solid #e9e9e9; 
    padding: 20px; 
    border-radius: 4px;
    background-color: #fff;
}
#bbp-vergleich-technisch .bbp-product-preview-item:last-child {
    margin-bottom: 0;
    border-bottom: none; 
}


/* Ausgeblendete Elemente */
#bbp-vergleich-ausgeblendet-sektion {
    background-color: #f5f5f5;
    padding: 15px; 
    border-radius: 4px;
    margin-top: 20px;
}
#bbp-vergleich-ausgeblendet-sektion h3 {
    margin-top:0;
}

.bbp-merkliste-ausgeblendet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted #ccc;
    flex-wrap: wrap; 
    gap: 10px; 
}
.bbp-merkliste-ausgeblendet-item:last-child {
    border-bottom: none;
}

.bbp-merkliste-ausgeblendet-item-info {
    flex-grow: 1; 
}
.bbp-merkliste-ausgeblendet-item-info .title {
    font-weight: bold;
}
.bbp-merkliste-ausgeblendet-item-info .usertext {
    font-style: italic;
    color: #666;
    font-size:0.9em;
    margin-left:5px;
}


.bbp-merkliste-ausgeblendet-item-actions {
    display: flex; 
    flex-wrap: nowrap; 
    gap: 8px;
}

.bbp-merkliste-ausgeblendet-item-actions .bbp-merkliste-button-small,
.bbp-merkliste-einblenden-btn { 
    padding: 5px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex; 
    align-items: center;
    gap: 4px;
}
.bbp-merkliste-ausgeblendet-item-actions .bbp-merkliste-button-small .dashicons {
    font-size: 14px; 
    line-height: 1; 
}


/* Allgemeine Button-Stile für Aktionen auf der Merkliste */
.bbp-merkliste-button-link { 
    background-color: #6c757d;
    color: white;
    border: 1px solid #5a6268;
}
.bbp-merkliste-button-link:hover {
    background-color: #5a6268;
    color: white;
}

.bbp-merkliste-ausblenden-btn {
    background-color: #ffc107; 
    color: #212529;
    border: 1px solid #e0a800;
}
.bbp-merkliste-ausblenden-btn:hover {
    background-color: #e0a800;
}

.bbp-merkliste-entfernen-btn {
    background-color: #dc3545; 
    color: white;
    border: 1px solid #c82333;
}
.bbp-merkliste-entfernen-btn:hover {
    background-color: #c82333;
}

.bbp-merkliste-einblenden-btn {
    background-color: #28a745; 
    color: white;
    border: 1px solid #1e7e34;
}
.bbp-merkliste-einblenden-btn:hover {
    background-color: #1e7e34;
}

/* Modal Styling */
.bbp-modal {
    display: flex; /* IMMER flex für Zentrierung */
    visibility: hidden; /* Initial versteckt */
    opacity: 0; /* Initial unsichtbar für Transition */
    transition: opacity 0.2s ease-in-out, visibility 0s linear 0.2s; /* Transition für opacity, visibility sofort nach Transition */
    position: fixed;
    z-index: 10001; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* overflow: auto; */ /* Entfernt, da der Inhalt selbst scrollbar ist, falls nötig */
    background-color: rgba(0,0,0,0.6); /* Etwas dunklerer Overlay */
    align-items: center;
    justify-content: center;
    padding: 20px; /* Padding für das Overlay, damit Modal nicht am Rand klebt */
    box-sizing: border-box;
}

.bbp-modal.bbp-modal-visible { /* Klasse zum Anzeigen */
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease-in-out, visibility 0s linear 0s;
}

.bbp-modal-content {
    background-color: #fff;
    padding: 25px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%; /* Nimmt Breite des Paddings im .bbp-modal an */
    max-width: 450px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative; 
    text-align: center; 
    max-height: 90vh; 
    overflow-y: auto; 
}

.bbp-modal-close {
    color: #aaa;
    position: absolute; 
    top: 8px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
}

.bbp-modal-close:hover,
.bbp-modal-close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.bbp-modal-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.bbp-modal-content p {
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.5;
}

.bbp-modal-actions {
    display: flex;
    justify-content: space-between; 
    gap: 10px; 
    margin-top: 20px;
    width: 100%; 
    box-sizing: border-box; 
}

.bbp-modal-button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    border: 1px solid transparent;
    flex-basis: auto; 
    flex-grow: 0; 
}

.bbp-modal-cancel-btn {
    background-color: #6c757d; 
    color: white;
    border-color: #5a6268;
}
.bbp-modal-cancel-btn:hover {
    background-color: #5a6268;
}

.bbp-modal-confirm-btn {
    background-color: #dc3545; 
    color: white;
    border-color: #c82333;
}
.bbp-modal-confirm-btn:hover {
    background-color: #c82333;
}


/* Responsivität */
@media screen and (max-width: 600px) {
    .bbp-vergleich-tabs {
        flex-direction: column; 
        align-items: stretch; 
    }
    .bbp-vergleich-tab-button {
        width: 100%;
        text-align: center;
        box-sizing: border-box; 
    }

    .bbp-merkliste-optisch-item-actions {
        flex-direction: row; 
        flex-wrap: nowrap; 
        align-items: center; 
        justify-content: flex-start; 
    }

    .bbp-merkliste-optisch-item-actions .bbp-merkliste-button-small,
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-ausblenden-btn, 
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-entfernen-btn {
        flex-shrink: 1; 
        min-width: 0;   
        margin-bottom: 0; 
        padding: 6px 8px; 
        text-align: center; 
        height: 32px; 
        line-height: 20px; 
    }

    .bbp-merkliste-optisch-item-actions .bbp-merkliste-button-link {
        flex-grow: 2;  
        flex-basis: 0; 
        font-size: 0.8rem; 
    }
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-button-link .dashicons {
        font-size: 16px; 
        vertical-align: middle; 
    }
    
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-ausblenden-btn {
        flex-grow: 1;
        flex-basis: 0;
        font-size: 0; 
    }
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-ausblenden-btn .dashicons {
        font-size: 20px; 
        margin: 0; 
        line-height: 1; 
        display: inline-block; 
        vertical-align: middle; 
    }

    .bbp-merkliste-optisch-item-actions .bbp-merkliste-entfernen-btn {
        flex-grow: 1;
        flex-basis: 0;
        font-size: 0; 
    }
    .bbp-merkliste-optisch-item-actions .bbp-merkliste-entfernen-btn .dashicons {
        font-size: 20px; 
        margin: 0; 
        line-height: 1;
        display: inline-block;
        vertical-align: middle;
    }
    
    .bbp-merkliste-ausgeblendet-item {
        flex-direction: column; 
        align-items: flex-start; 
    }
    .bbp-merkliste-ausgeblendet-item-actions {
        margin-top: 8px;
        width: 100%; 
        justify-content: flex-start; 
    }

    /* Modal Content auf kleineren Bildschirmen */
    .bbp-modal-content {
        width: 90%;
        /* margin: 10% auto; */ /* Zentrierung erfolgt durch Flexbox auf .bbp-modal */
        padding: 20px;
    }
    .bbp-modal-actions {
        flex-direction: column; 
        gap: 10px;
    }
    .bbp-modal-button { 
        width: 100%; 
        box-sizing: border-box;
    }
}
