/* =========================================================
   BULK CREATE LISTINGS
   Theme colors come from style.css
========================================================= */

body {
    background: var(--background);
    color: var(--text);
}

.bulk-page {
    width: min(1180px, calc(100% - 40px));
    margin: 42px auto;
    padding-bottom: 80px;
}

/* =========================================================
   HEADER
========================================================= */

.bulk-header {
    margin-bottom: 28px;
    text-align: center;
}

.bulk-header h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.bulk-header p {
    margin: 0;
    color: var(--text-light);
}

/* =========================================================
   SHARED PANELS
========================================================= */

.bulk-toolbar,
.bulk-card,
.bulk-results {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
}

.bulk-toolbar .spacer,
.bulk-card-head .spacer {
    flex: 1;
}

.bulk-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

.bulk-toolbar select,
.bulk-card input,
.bulk-card textarea,
.bulk-card select,
#bulkValue {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.bulk-toolbar select {
    width: auto;
}

.bulk-toolbar select:focus,
.bulk-card input:focus,
.bulk-card textarea:focus,
.bulk-card select:focus,
#bulkValue:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.bulk-card input::placeholder,
.bulk-card textarea::placeholder,
#bulkValue::placeholder {
    color: var(--text-light);
}

/* =========================================================
   BULK CARD
========================================================= */

.bulk-card {
    margin-bottom: 18px;
    padding: 20px;
}

.bulk-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.bulk-card-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
}

.bulk-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: 20px;
}

.bulk-fields {
    display: grid;
    gap: 14px;
}

.bulk-fields .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bulk-field {
    display: grid;
    gap: 7px;
}

.bulk-field label {
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
}

.bulk-field small {
    color: var(--text-light);
}

/* =========================================================
   UPLOAD
========================================================= */

.bulk-upload {
    display: grid;
    min-height: 230px;
    place-items: center;
    padding: 16px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.bulk-upload:hover,
.bulk-upload.dragover {
    border-color: var(--primary);
    background: var(--surface-alt);
}

.bulk-upload img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 10px;
}

.bulk-upload strong {
    display: block;
    margin: 8px 0;
    color: var(--text);
}

.bulk-upload span {
    color: var(--text-light);
    font-size: .9rem;
}

/* =========================================================
   ACTIONS AND STATUS
========================================================= */

.bulk-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.bulk-status {
    color: var(--text-light);
    font-size: .9rem;
}

.bulk-error {
    margin-top: 8px;
    color: var(--danger);
    font-size: .9rem;
}

/* =========================================================
   RESULTS
========================================================= */

.bulk-results {
    margin: 20px 0;
    padding: 18px;
}

.bulk-results[hidden] {
    display: none;
}

.bulk-results h2,
.bulk-results h3 {
    color: var(--text);
}

.bulk-results ul {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.bulk-results li {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
}

.bulk-results li.failed {
    border: 1px solid var(--danger);
    background: color-mix(
        in srgb,
        var(--danger) 10%,
        var(--surface)
    );
    color: var(--danger);
}

.bulk-empty {
    padding: 28px;
    color: var(--text-light);
    text-align: center;
}

/* =========================================================
   SELECTION
========================================================= */

.bulk-selection {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.bulk-selection input {
    width: auto;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 760px) {
    .bulk-page {
        width: calc(100% - 24px);
        margin-top: 28px;
        padding-bottom: 50px;
    }

    .bulk-card-grid,
    .bulk-fields .row {
        grid-template-columns: 1fr;
    }

    .bulk-toolbar .spacer {
        display: none;
    }

    .bulk-toolbar > * {
        width: 100%;
    }

    .bulk-toolbar select {
        width: 100%;
    }

    .bulk-card-head {
        align-items: flex-start;
    }

    .bulk-card-head .spacer {
        min-width: 8px;
    }

    .bulk-card {
        padding: 16px;
    }
}