/* ===========================
   BMM4YS – Modern UI Styling
   =========================== */

:root {
    --bmm4ys-bg: #ffffff;
    --bmm4ys-surface: #f8fafc;
    --bmm4ys-border: #dce3ed;
    --bmm4ys-muted: #6b7a86;
    --bmm4ys-text: #0b3b4a;
    --bmm4ys-accent: #0aa0ad;
    --bmm4ys-accent-dark: #008c99;
    --bmm4ys-radius: 10px;
    --bmm4ys-radius-sm: 6px;
    --bmm4ys-shadow: 0 4px 12px rgba(10, 160, 173, 0.05);
    --bmm4ys-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.bmm4ys-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Prevents clicks even if logic fails */
}
/* Improved Fields to Update layout */
.bmm4ys-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 14px 25px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e3e6eb;
    border-radius: 8px;
    margin-top: 12px;
}
.bmm4ys-actions-row {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}


/* Checkbox label styling */
.bmm4ys-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    color: #1d2327;
}

/* Make Select All stand out */
.bmm4ys-checkbox-grid .select-all {
    font-weight: 600;
    color: #0073aa;
}

.bmm4ys-card {
    background: #ffffff;
    padding: 20px 25px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    margin-bottom: 25px;
}

.bmm4ys-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

.bmm4ys-dropzone {
    display: block;
    border: 2px dashed #56a6c5;
    background: #eef8fb;
    border-radius: 6px;
    padding: 45px 20px;
    cursor: pointer;
    text-align: center;
}

.bmm4ys-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bmm4ys-drop-icon svg {
    width: 38px;
    height: 30px;
    fill: #56a6c5;
    /* margin-bottom: 10px; */
}

.bmm4ys-drop-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.bmm4ys-drop-sub,
.bmm4ys-drop-info {
    font-size: 12px;
    color: #777;
}
.bmm4ys-actions-row {
    margin-top: 10px;
    display: flex;
    gap: 12px;
}

.bmm4ys-btn {
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 14px;
}

.bmm4ys-btn-primary {
    background: #007cba;
    color: white;
}

.bmm4ys-btn-outline {
    background: #f7f7f7;
    border: 1px solid #ccc;
}


/* Container */
.bmm4ys-wrap {
    /* max-width: 850px; */
    margin-top: 20px;
    font-family: var(--bmm4ys-font);
}
.bmm4ys-wrap {
    max-width: 1150px;
    margin: 30px auto;
}
.bmm4ys-page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--bmm4ys-text);
    margin-bottom: 4px;
}

.bmm4ys-subtitle {
    color: var(--bmm4ys-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.bmm4ys-ui-container {
    max-width: 650px;
    margin-top: 14px;
}

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

.bmm4ys-card {
    background: var(--bmm4ys-bg);
    border: 1px solid var(--bmm4ys-border);
    border-radius: var(--bmm4ys-radius);
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: var(--bmm4ys-shadow);
}

.bmm4ys-title {
    font-size: 17px;
    font-weight: 600;
    color: #0a3a4a;
    margin: 0 0 12px;
}

/* ====================
   DROPZONE
   ==================== */

.bmm4ys-dropzone {
    width: 100%;
    border: 2px dashed #d5dee7;
    background: var(--bmm4ys-surface);
    border-radius: var(--bmm4ys-radius);
    padding: 45px 20px;
    text-align: center;
    cursor: pointer;
    transition: .25s;
    box-sizing: border-box;
}

.bmm4ys-dropzone:hover {
    border-color: var(--bmm4ys-accent);
    background: #f0fafb;
}

.bmm4ys-dropzone .bmm4ys-drop-icon {
    width: 48px;
    height: 48px;
    background: #0aa0ad22;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bmm4ys-dropzone .bmm4ys-drop-icon svg {
    width: 26px;
    height: 26px;
    fill: #0aa0ad;
}

.bmm4ys-drop-title {
    margin-top: 10px;
    color: #0b3b4a;
    font-size: 16px;
    font-weight: 700;
}

.bmm4ys-drop-sub {
    color: #6b7a86;
    font-size: 14px;
}

.bmm4ys-drop-info {
    font-size: 13px;
    color: #8595a2;
    margin-top: 4px;
}

/* ====================
   CHECKBOX GRID
   ==================== */

.bmm4ys-checkbox-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: center;
}

.bmm4ys-checkbox-grid label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #0b3b4a;
}

.bmm4ys-checkbox-grid input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--bmm4ys-accent);
}

#bmm4ys_select_all {
    transform: scale(1.1);
}

/* ====================
   BUTTONS
   ==================== */

.bmm4ys-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
}

/* Primary */
#bmm4ys_upload_btn {
    background: var(--bmm4ys-accent);
    color: #fff;
    border-color: var(--bmm4ys-accent);
}

#bmm4ys_upload_btn:hover {
    background: var(--bmm4ys-accent-dark);
}

#bmm4ys_upload_btn.bmm4ys-disabled {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Outline */
#bmm4ys_generate_btn {
    background: #fff;
    color: var(--bmm4ys-accent);
    border: 2px solid var(--bmm4ys-accent);
}

#bmm4ys_generate_btn:hover {
    background: #e8fafb;
}

/* ====================
   PREVIEW TABLE
   ==================== */

#bmm4ys_preview_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#bmm4ys_preview_table th {
    background: #f7f9fc;
    font-weight: 600;
    border: 1px solid #dce3ed;
    padding: 8px;
}

#bmm4ys_preview_table td {
    border: 1px solid #e7edf2;
    padding: 8px;
}

/* PROGRESS BAR */

#bmm4ys_progress_wrap {
    margin-top: 12px;
}

#bmm4ys_progress {
    height: 12px;
    background: #e7edf2;
    border-radius: 50px;
}

#bmm4ys_progress_bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bmm4ys-accent-dark), var(--bmm4ys-accent));
    transition: width .25s linear;
}

/* FULL-WIDTH FIXES */
.bmm4ys-ui-container,
.bmm4ys-card,
#bmm4ys_csv_preview,
.bmm4ys-preview-scroll {
    width: 97% !important;
    max-width: 100% !important;
}

.bmm4ys-preview-scroll {
    overflow-x: auto;
}

/* ====================
   LOADER OVERLAY (append)
   ==================== */

/* Loader overlay */
.bmm4ys-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(11,59,74,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

/* Inner box */
.bmm4ys-loader-inner {
    background: #fff;
    border-radius: 10px;
    padding: 18px 22px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 8px 30px rgba(11,59,74,0.12);
    min-width: 280px;
}

/* Spinner */
.bmm4ys-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid rgba(10,160,173,0.15);
    border-top-color: var(--bmm4ys-accent);
    animation: bmm4ys-spin 1s linear infinite;
}

@keyframes bmm4ys-spin {
    to { transform: rotate(360deg); }
}

.bmm4ys-loader-text {
    font-weight:600;
    color: #0b3b4a;
    font-size: 15px;
}
table.widefat tr th{
    color:#0a3a4a!important;
}
.bmm4ys-btn{
    margin-top: 15px;
}

.bmm4ys-wrap .bmm4ys-card {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
}

.bmm4ys-dropzone {
    display: block;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
}

.bmm4ys-dropzone:hover {
    background: #f8fafc;
}

.drop-inner .dashicons {
    font-size: 36px;
    color: #2271b1;
    margin-bottom: 10px;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.fields-grid label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.select-all {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}
