/* DienstClip Deals – Frontend Styles */

.dienstclip-deals-wrap {
    margin: 20px 0;
    font-family: inherit;
}

.dienstclip-deals-heading {
    font-size: 1.15em;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.dienstclip-deals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

/* Individual deal row */
.dienstclip-deal-item {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s;
    cursor: pointer;
    user-select: none;
}

.dienstclip-deal-item:hover:not(.is-disabled) {
    border-color: #8961fe;
}

.dienstclip-deal-item.is-selected {
    border-color: #8961fe;
    box-shadow: 0 0 0 1px #8961fe33;
}

.dienstclip-deal-item.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Label / row inner */
.dienstclip-deal-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* Custom radio */
.dienstclip-deal-radio-wrap {
    flex-shrink: 0;
    line-height: 1;
}

.dienstclip-deal-radio-wrap input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #c0c0c0;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    transition: border-color 0.18s;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    margin: 0;
}

.dienstclip-deal-radio-wrap input[type="radio"]:checked {
    border-color: #8961fe;
    background: #fff;
}

.dienstclip-deal-radio-wrap input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8961fe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Deal title */
.dienstclip-deal-title {
    flex: 1;
    font-size: 0.97em;
    font-weight: 600;
    color: #1a1a1a;
}

/* Pricing */
.dienstclip-deal-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-align: right;
}

.dienstclip-deal-regular {
    font-size: 0.85em;
    color: #888;
    text-decoration: line-through;
}

.dienstclip-deal-regular .woocommerce-Price-amount {
    color: #888;
}

.dienstclip-deal-price {
    font-size: 1.08em;
    font-weight: 700;
    color: #1a1a1a;
}

/* ── Cart page ──────────────────────────────────────────────────────────── */

.dienstclip-deal-cart-badge {
    display: inline-block;
    background: #8961fe;
    color: #fff;
    font-size: 0.72em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* Locked qty display – shown instead of the editable input */
.dienstclip-deal-qty-wrap {
    display: inline-flex;
    align-items: center;
}

.dienstclip-deal-qty-locked {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95em;
    background: #f3f0ff;
    border: 1.5px solid #8961fe44;
    border-radius: 5px;
    padding: 5px 12px;
    color: #5a3db8;
    cursor: default;
    user-select: none;
}

/* ── Fully locked deal row in cart ──────────────────────────────────────── */

[data-dienstclip-deal="true"],
tr.dienstclip-deal-locked,
.dienstclip-deal-locked {
    background-color: transparent !important;
    position: relative;
}

/* Disable ALL interactive elements inside the row, except the remove button */
[data-dienstclip-deal="true"] input:not([type="hidden"]):not(.dc-allow),
[data-dienstclip-deal="true"] select,
[data-dienstclip-deal="true"] textarea,
[data-dienstclip-deal="true"] button:not(.remove):not(.product-remove):not([class*="remove"]),
[data-dienstclip-deal="true"] .plus,
[data-dienstclip-deal="true"] .minus,
[data-dienstclip-deal="true"] .qty-plus,
[data-dienstclip-deal="true"] .qty-minus,
[data-dienstclip-deal="true"] [data-quantity],
tr.dienstclip-deal-locked input:not([type="hidden"]),
tr.dienstclip-deal-locked select,
tr.dienstclip-deal-locked .plus,
tr.dienstclip-deal-locked .minus {
    pointer-events: none !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    user-select: none !important;
}

/* The remove button stays clickable */
[data-dienstclip-deal="true"] a.remove,
[data-dienstclip-deal="true"] .product-remove a,
[data-dienstclip-deal="true"] .product-remove button,
[data-dienstclip-deal="true"] [class*="remove"],
tr.dienstclip-deal-locked a.remove,
tr.dienstclip-deal-locked .product-remove {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Hover indicator showing the row is locked */
[data-dienstclip-deal="true"] .quantity::before,
tr.dienstclip-deal-locked .quantity::before {
    content: "🔒 ";
    font-size: 0.85em;
    color: #8961fe;
    margin-right: 4px;
    opacity: 0.8;
}

/* ── Admin table ────────────────────────────────────────────────────────── */
.dienstclip-deals-table th {
    background: #f9f9f9;
    font-weight: 600;
}

.dienstclip-deals-table td,
.dienstclip-deals-table th {
    padding: 8px 10px;
    vertical-align: middle;
}
