/* Cart page: Bearbeiten modal + action buttons + design upload */

/* ── action button bar ── */
.lpc-cart-actions-placeholder,
.lpc-cart-actions-bar {
    margin-top: 0.5em;
}

.lpc-cart-actions-bar__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.lpc-cart-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #333;
    background: #fff;
    color: #222;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lpc-cart-edit-btn:hover {
    background: #222;
    color: #fff;
}

.lpc-cart-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lpc-cart-edit-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.lpc-cart-edit-btn--remove:hover {
    border-color: #b00;
    background: #b00;
    color: #fff;
}

.lpc-cart-edit-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ── uploaded files list ── */
.lpc-cart-actions-bar__files {
    margin-top: 0.4rem;
    padding-left: 0.15rem;
}

.lpc-cart-edit-file-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #444;
    margin-top: 0.2rem;
}

.lpc-cart-edit-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lpc-cart-edit-file-remove {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
}

.lpc-cart-edit-file-remove:hover {
    background: #f0f0f0;
    color: #b00;
    border-color: #999;
}

/* ── overlay ── */
.lpc-cart-edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 1rem;
}

/* ── modal card ── */
.lpc-cart-edit-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.lpc-cart-edit-modal__name {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.lpc-cart-edit-modal__title {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
}

/* ── qty input (read-only) ── */
.lpc-cart-edit-modal__input {
    display: block;
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    background: #fafafa;
    color: #222;
}

/* ── slider ── */
.lpc-cart-edit-modal__slider-wrap {
    position: relative;
    margin-bottom: 1.25rem;
    height: 22px;
    display: flex;
    align-items: center;
}

.lpc-cart-edit-modal__slider-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    width: 100%;
    background: #e0e0e0;
    border-radius: 3px;
    pointer-events: none;
}

.lpc-cart-edit-modal__slider-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    width: var(--lpc-slider-percent, 0%);
    background: #4caf50;
    border-radius: 3px;
    pointer-events: none;
    transition: width 0.05s ease;
}

.lpc-cart-edit-modal__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 22px;
    background: transparent;
    position: relative;
    z-index: 1;
    margin: 0;
    cursor: pointer;
}

.lpc-cart-edit-modal__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4caf50;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.lpc-cart-edit-modal__range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4caf50;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.lpc-cart-edit-modal__range::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
    border-radius: 3px;
}

.lpc-cart-edit-modal__range::-moz-range-track {
    height: 6px;
    background: transparent;
    border-radius: 3px;
}

/* ── price display ── */
.lpc-cart-edit-modal__prices {
    margin-bottom: 1.25rem;
    padding: 0.75rem 0.85rem;
    background: #f7f7f7;
    border-radius: 8px;
}

.lpc-cart-edit-modal__price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.2rem 0;
    font-size: 0.95rem;
}

.lpc-cart-edit-modal__price-row--total {
    margin-top: 0.25rem;
    padding-top: 0.4rem;
    border-top: 1px solid #e0e0e0;
    font-weight: 700;
    font-size: 1rem;
}

.lpc-cart-edit-modal__price-label {
    color: #555;
}

.lpc-cart-edit-modal__price-value {
    font-weight: 600;
    color: #222;
}

.lpc-cart-edit-modal__price-row--total .lpc-cart-edit-modal__price-value {
    font-size: 1.05rem;
}

/* ── actions ── */
.lpc-cart-edit-modal__actions {
    display: flex;
    gap: 0.75rem;
}

.lpc-cart-edit-modal__btn {
    flex: 1;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    transition: opacity 0.15s;
}

.lpc-cart-edit-modal__btn--cancel:hover {
    background: #f5f5f5;
}

.lpc-cart-edit-modal__btn--save {
    background: #222;
    color: #fff;
    border-color: #222;
}

.lpc-cart-edit-modal__btn--save:hover:not(:disabled) {
    opacity: 0.88;
}

.lpc-cart-edit-modal__btn--save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
