/* Compare Drawer — custom implementation */
.dg-compare-drawer {
    --panel-width: min(500px, calc(100vw - 46px));
    position: fixed;
    right: calc(-1 * var(--panel-width));
    top: 50%;
    transform: translateY(-50%);
    z-index: 1060;
    display: flex;
    transition: right 0.3s ease;
}

.dg-compare-drawer.is-open {
    right: 0;
}


/* Sticky toggle button — always visible on left edge */
.dg-compare-toggle {
    position: absolute;
    left: -23px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    background: #E2EAF2;
    color: #000;
    border: none;
    padding: 10px 20px 10px 10px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
}

/* Panel */
.dg-compare-drawer__panel {
    width: var(--panel-width);
    max-height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

/* Header */
.dg-compare-drawer__header {
    display: flex;
    justify-content: flex-end;
    padding: 25px 15px 0;
}

.dg-compare-drawer__title {
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0;
}

.dg-compare-drawer__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.dg-compare-drawer__close:hover {
    color: #000;
}

/* Remove border-radius from buttons inside drawer */
.dg-compare-drawer .wp-block-button__link {
    border-radius: 0 !important;
}

/* Body */
.dg-compare-drawer__body {
    overflow-y: auto;
    flex: 1;
    padding-top: 0 !important;
}

/* Item list */
.dg-compare-drawer__list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
}

.dg-compare-drawer__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
}

.dg-compare-drawer__name {
    font-weight: 800;
    font-size: 0.95rem;
}

.dg-compare-drawer__remove {
    background: var(--wp--preset--color--primary);
    border: none;
    border-radius: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dg-compare-drawer__remove:hover {
    background: var(--wp--preset--color--primary-dark);
}

/* Compare button */
.dg-compare-drawer__btn {
    margin-top: 20px;
}

/* Backdrop */
.dg-compare-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1055;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dg-compare-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}
