/* -------------------------------
   Digitaview Seller Dashboard Styles 
------------------------------------ */

/* Main Layout */
.dv-container {
    display: flex;
    gap: 16px;
    min-height: 480px;
}

/* Sidebar */
.dv-sidebar {
    width: 220px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    flex-shrink: 0;
}

.dv-sidebar ul {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.dv-sidebar li {
    padding: 12px 14px;
    margin-bottom: 6px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
}

.dv-sidebar li:hover {
    background: #fff4e6;
}

.dv-sidebar li.active {
    background: #ffa500;
    color: #fff;
}

/* Content Area */
.dv-content {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 18px;
    min-width: 0; /* Prevent overflow */
    overflow-x: hidden;
}

.dv-loading {
    text-align: center;
    padding: 30px;
    color: #374151;
}

/* Header */
.dv-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dv-title {
    font-size: 20px;
    margin: 0;
}

/* Cards & Grid */
.dv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.dv-card {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

.dv-card-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dv-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    background: #f6f6f6;
}

.dv-card-title h4 {
    margin: 0;
    font-size: 15px;
}

.dv-small {
    color: #6b7280;
    font-size: 13px;
}

/* Buttons */
.dv-btn {
    background: #ffa500;
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.dv-btn-small {
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* Modal */
.dv-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.dv-modal-content {
    width: 100%;
    max-width: 820px;
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.06);
}

.dv-modal-content label {
    display: block;
    margin-bottom: 8px;
}

.dv-row {
    display: flex;
    gap: 12px;
}

.dv-row label {
    flex: 1;
}

.dv-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Text helpers */
.dv-empty {
    padding: 20px;
    color: hwb(220 42% 50% / 0);
    text-align: center;
}

.dv-error {
    color: #b91c1c;
    padding: 20px;
    text-align: center;
}

.dv-big {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* Lock page when modal opens */
html.dv-modal-open {
    overflow: hidden;
}

/* Dashboard Wrapper */
#dv-seller-dashboard {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow: hidden;
}

/* -------------------------------
   MOBILE RESPONSIVE FIXES
-------------------------------- */
@media (max-width: 768px) {

    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Stack layout */
    #dv-seller-dashboard {
        flex-direction: column;
    }

    /* Sidebar becomes horizontal scroll tabs */
    .dv-sidebar {
        width: 100%;
        padding: 6px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        border-bottom: 1px solid #e5e5e5;
    }

    .dv-sidebar ul {
        display: flex;
        flex-direction: row;
        gap: 15px;
        padding: 0;
        width: 100%;
    }

    .dv-sidebar li {
        display: inline-block;
        padding: 10px 15px;
        white-space: nowrap;
        margin-bottom: 0;
    }

    /* Content full width */
    .dv-content {
        width: 100%;
        padding: 15px;
    }

    /* Form elements fit screen */
    .dv-modal-content {
        padding: 12px !important;
        box-sizing: border-box;
        width: 100% !important;
    }

    .dv-modal-content input,
    .dv-modal-content select,
    .dv-modal-content textarea {
        width: 100% !important;
    }

    /* Grid collapses to 1 column */
    .dv-grid {
        grid-template-columns: 1fr !important;
    }

    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

/* FIX: Prevent Add Product modal from overflowing */
.dv-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* FIX: Parent containers should not clip the modal */
#dv-seller-dashboard,
.dv-content {
    overflow: visible !important;
}

/* Mobile-safe scroll fix */
@media (max-width: 768px) {
    .dv-modal-content {
        max-height: 95vh;
        padding-bottom: 20px;
    }
}