/* Boundary-upload card + Excel-entry card on ONE row (wrapped in <div class="bulk-row">).
   Written as CSS, not JS, so the page is already laid out and collapsed on first paint.
   JS (bulk_boundary_upload.js, master_excel_entry.js) only toggles .is-open on a card. */

.bulk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;   /* a closed card stays short while the other is open */
    margin-bottom: 16px;
}

/* both open -> same height */
.bulk-row:has(> .is-open ~ .is-open) {
    align-items: stretch;
}

.bulk-row > :is(.bulk-upload-card, .master-excel-card) {
    flex: 1 1 380px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
}

.bulk-row > :is(.bulk-upload-card, .master-excel-card):not(.is-open) {
    cursor: pointer;
}

.bulk-row h4 {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.3;
}

/* Closed by default, before any JS has run: only the heading bar shows. */
.bulk-row > :is(.bulk-upload-card, .master-excel-card):not(.is-open) > :not(.bulk-upload-toggle):not(h4) {
    display: none;
}

/* Opened part of a card fills it, so the drop zone and button line up across both cards. */
.bulk-row > :is(.bulk-upload-card, .master-excel-card) > :last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bulk-row > .is-open > :last-child {
    margin-top: 15px;
}

.bulk-row form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bulk-row .upload-zone,
.bulk-row .master-excel-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 20px 16px !important;
    margin: 12px 0 !important;
    border-radius: 10px !important;
}

.bulk-row .upload-icon,
.bulk-row .master-excel-zone-icon {
    font-size: 34px !important;
    margin-bottom: 8px !important;
}

.bulk-row .upload-text,
.bulk-row .master-excel-filename {
    font-size: 14px !important;
    font-weight: 600;
    margin: 0 0 2px !important;
}

.bulk-row .upload-hint,
.bulk-row .master-excel-hint {
    font-size: 12px !important;
}

.bulk-row .btn-success,
.bulk-row .master-excel-submit {
    align-self: flex-start;
    border: none;
    color: #fff !important;
    background: linear-gradient(45deg, #f4511e, #f97316) !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600;
    border-radius: 8px !important;
}
