/* Use the theme's dynamic variables with fallbacks */
:root {
    --dp-primary: var(--natural-diamond-color, #333333);
    --dp-secondary: var(--labgrown-diamond-color, #c5a059);
    --dp-bg-light: #f8f9fa;
    --dp-border: #e9ecef;
}

/* --- SIDEBAR STYLES --- */
.dp-side-panel {
    position: absolute;
    max-height: 100vh;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    background: #fff;
    z-index: 100000;
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.dp-side-panel.show {
    transform: translateX(0);
}

.dp-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.dp-panel-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Header */
.dp-panel-header {
    padding: 15px 20px;
    background: var(--dp-primary);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-panel-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.dp-panel-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* Cart Items */
.dp-cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--dp-border);
    gap: 15px;
    background: #fff;
    transition: background 0.2s;
    position: relative;
}

.dp-cart-item:hover {
    background: var(--dp-bg-light);
}

.dp-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid var(--dp-border);
    border-radius: 4px;
    background: #fff;
}

.dp-cart-item-details {
    flex: 1;
    padding-right: 20px;
}

.dp-item-title {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.dp-item-specs {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.dp-item-price {
    font-weight: 700;
    color: var(--dp-primary);
    font-size: 14px;
}

.dp-remove-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    background: #fff;
    border: 1px solid #e9ecef;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.dp-remove-btn:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

/* Footer Buttons */
.dp-panel-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid var(--dp-border);
}

.dp-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    text-decoration: none;
}

.dp-btn:hover {
    opacity: 0.9;
    text-decoration: none;
    color: #fff;
}

.dp-btn-primary {
    background: var(--dp-primary);
    color: #fff;
}

.dp-btn-secondary {
    background: var(--dp-secondary);
    color: #fff;
}

/* --- TOAST --- */
#dp-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dp-primary);
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    font-weight: 500;
}

#dp-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- MODAL FORM STYLES --- */
.dp-modal-header {
    background: var(--dp-primary);
    color: #fff;
    border-radius: 0;
    padding: 15px 20px;
}

.dp-modal-title {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.dp-form-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.dp-form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
}

.dp-form-group {
    margin-bottom: 15px;
}

.intl_btn {
    background: var(--dp-primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    width: 100%;
    display: block;
    margin-top: 20px;
}

.intl_btn:hover {
    background: #000;
    color: #fff;
    opacity: 0.9;
}

.dp-disclaimer-box {
    padding: 10px 20px;
    color: #555;
}

.dp-disclaimer-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #333;
    letter-spacing: 0.5px;
}

.dp-disclaimer-list {
    padding-left: 15px;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

.dp-disclaimer-list li {
    margin-bottom: 8px;
}

/* --- NEW COMPARE TABLE STYLES --- */
.dp-compare-table-wrapper {
    padding: 20px;
    overflow-x: auto;
    background: #fafafa;
}

.dp-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dp-compare-table th {
    text-align: left;
    font-weight: 600;
    color: #333;
    padding: 15px;
    background: #f0f0f0;
    border-bottom: 2px solid var(--dp-border);
    border-right: 1px solid var(--dp-border);
    width: 150px;
    vertical-align: top;
    font-size: 13px;
}

.dp-compare-table th:last-child {
    border-right: none;
}

.dp-compare-table td {
    padding: 0;
    vertical-align: top;
    border-right: 1px solid var(--dp-border);
    transition: background 0.2s;
}

.dp-compare-table td:hover {
    background: #f9f9f9;
}

.dp-compare-table td:last-child {
    border-right: none;
}

.dp-compare-column {
    width: 220px;
}

.dp-compare-header {
    padding: 20px 15px;
    background: #fff;
    border-bottom: 2px solid var(--dp-primary);
    text-align: center;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dp-compare-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dp-compare-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.dp-compare-image {
    width: 160px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
    background: #f8f8f8;
    border-radius: 4px;
    padding: 5px;
}

.dp-compare-lot {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    font-weight: 500;
}

.dp-compare-spec-row {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #555;
    text-align: center;
}

.dp-compare-spec-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 16px;
    color: var(--dp-primary);
    background: #f8f9fa;
}

.dp-compare-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.dp-compare-empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.dp-compare-empty-state h4 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Button loading state */
.dp-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media(max-width: 576px) {
    .dp-side-panel {
        width: 100%;
    }

    .dp-compare-table {
        min-width: 500px;
    }

    .dp-compare-column {
        width: 180px;
    }
}

/* Tooltip CSS */
.cart-item-tooltip {
    display: none;
    position: fixed;
    z-index: 100000;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    /* Let mouse events pass through */
    min-width: 200px;
}

.cart-item-tooltip table {
    margin: 0;
    width: 100%;
}

.cart-item-tooltip th,
.cart-item-tooltip td {
    padding: 2px 5px;
    border: 1px solid #eee;
}

.cart-item-tooltip th {
    background: #f9f9f9;
    font-weight: 600;
}

@media(max-width: 576px) {
    #diamond_actions .btn {
        flex-direction: column;
        padding: 12px 12px 6px !important;
    }

    #diamond_actions .btn i {
        font-size: 1rem !important;
    }

    #portal-toolbar a i {
        font-size: .8rem !important;
    }

    #portal-toolbar a span {
        margin-left: 4px !important;
    }

    .dp-modal-title {
        width: 100%;
    }
}

.col-md-12.text-center.ready_to_ship_toggle.margin-top-20.switch_outer_class {
    border-radius: 30px;
}