/* Plugin: InstructorPro Suite | File Version: 2016v2 */
/* ==========================================================================
   EZ2D Finance Manager  Products (FINAL CORRECTED - RESPONSIVE)
   ========================================================================== */

/* -----------------------------------------
   HEADER (match Payments)
------------------------------------------ */
.ez2d-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.ez2d-product-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ez2d-product-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.ez2d-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.ez2d-product-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.25rem 0 0;
}

/* Modern buttons (match Payments) */
.ez2d-btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.ez2d-btn-modern svg {
    flex-shrink: 0;
}

.ez2d-btn-modern.ez2d-btn-primary {
    background: white;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ez2d-btn-modern.ez2d-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ez2d-btn-modern.ez2d-btn-primary:active {
    transform: translateY(0);
}

.ez2d-btn-modern.ez2d-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    box-shadow: none;
}

.ez2d-btn-modern.ez2d-btn-secondary:hover {
    background: #e2e8f0;
}

/* -----------------------------------------
   MODERN MODAL (match Payments/Coupons)
------------------------------------------ */

.ez2d-modern-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
}

.ez2d-modern-modal.active,
.ez2d-modern-modal.open {
    display: flex;
}

.ez2d-modern-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ez2d-modern-modal-dialog {
    position: relative;
    z-index: 100000;
    width: min(1200px, 96vw);
    max-height: 90vh;
    overflow: auto;
    overflow-x: hidden;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ez2d-modern-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.ez2d-modern-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.ez2d-modern-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.ez2d-modern-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

body.ez2d-modal-open {
    overflow: hidden;
}

/* -----------------------------------------
   FORM WRAPPER + LAYOUT
------------------------------------------ */

.ez2d-products-form-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border-radius: var(--ez2d-card-radius);
    background: transparent;
    border: none;
    box-shadow: none;
}

.ez2d-products-stack > .ez2d-products-form-card {
    margin-bottom: 18px;
}

/* Center form on large screens with max-width */
.ez2d-modern-form {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Orders-like two-column modal body */
.ez2d-product-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* -------- ROW 1: 5 columns on desktop -------- */
.ez2d-form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ez2d-description-col {
    width: 100%;
}

/* -----------------------------------------
   DESCRIPTION FIELD
------------------------------------------ */

.ez2d-field-description textarea,
.ez2d-description-col textarea {
    width: 100%;
    height: 200px;
    min-height: 200px;
    resize: vertical;
    background: #fff;
    border: 1px solid var(--ez2d-border-subtle);
    border-radius: var(--ez2d-card-radius);
    padding: .75rem;
    font-size: 15px;
    box-shadow: var(--ez2d-card-shadow);
}

.ez2d-description-col .wp-editor-wrap,
.ez2d-description-col .wp-editor-container,
.ez2d-description-col .wp-editor-area {
    width: 100% !important;
    max-width: 100% !important;
}

.ez2d-description-col .wp-editor-container {
    min-width: 100%;
}

/* -----------------------------------------
   PACKAGE PANEL
------------------------------------------ */

#ez2d_package_panel {
    display: none;
    background: #f8fafc;
    border: 1px solid var(--ez2d-border-subtle);
    border-radius: var(--ez2d-card-radius);
    padding: 15px;
    width: 100%;
    min-width: 0;
}

.ez2d-package-col {
    width: 100%;
}

.ez2d-package-col label {
    color: var(--ez2d-text-strong);
}

.ez2d-package-col .ez2d-field-help {
    color: #64748b;
}

#ez2d_package_panel.is-visible {
    display: block;
}

.ez2d-package-add-row {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ez2d-package-add-row select {
    flex: 1;
    min-width: 0;
}

/* Slightly narrower add-to-package row so button fits comfortably */
.ez2d-package-add-row select,
.ez2d-package-add-row #ez2d_add_package_item {
    max-width: 420px;
}

.ez2d-package-add-row #ez2d_add_package_item {
    min-width: 120px;
}

.ez2d-package-add-row {
    padding: 0 50px;
    justify-content: center;
}

.ez2d-package-col #ez2d_package_add_select {
    width: 100%;
}

.ez2d-package-add-row #ez2d_add_package_item {
    margin-left: auto;
}

.ez2d-package-items-list {
    list-style: none;
    margin-top: 12px;
    padding: 0;
}

/* Package items when editing */
.ez2d-package-items-list:not(:empty) {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ez2d-border-subtle);
}

.ez2d-package-item {
    display: grid;
    grid-template-columns: 1fr 80px 48px;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--ez2d-border-subtle);
    box-shadow: var(--ez2d-card-shadow);
    margin-bottom: 12px;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ez2d-package-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ez2d-text-strong);
}

.ez2d-pkg-qty {
    width: 70px !important;
    text-align: center;
    padding: 6px 8px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid var(--ez2d-border-subtle);
}

.ez2d-package-item-remove {
    width: 34px;
    height: 34px;
    background: transparent;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.ez2d-package-item-remove:hover {
    color: #d73535;
    border-color: #d73535;
    background: rgba(215, 53, 53, 0.08);
}

.ez2d-package-item-remove::before {
    content: "\1F5D1";
    font-size: 16px;
    line-height: 1;
}

/* -----------------------------------------
   INPUTS (UNIFIED)
------------------------------------------ */

.ez2d-products-form-card input[type="text"],
.ez2d-products-form-card input[type="number"],
.ez2d-products-form-card select,
.ez2d-products-form-card textarea {
    background: #fff;
    border: 1px solid var(--ez2d-border-subtle);
    border-radius: var(--ez2d-card-radius);
    padding: .55rem .75rem;
    font-size: 15px;
    color: var(--ez2d-text);
    width: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ez2d-products-form-card .ez2d-form-field {
    width: 100%;
}

.ez2d-products-form-card input:focus,
.ez2d-products-form-card select:focus,
.ez2d-products-form-card textarea:focus {
    border-color: var(--ez2d-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    outline: none;
}

/* -----------------------------------------
   PRICE ADDON
------------------------------------------ */

.ez2d-input-with-addon {
    display: flex;
    gap: 6px;
}

.ez2d-field-price .ez2d-input-with-addon,
.ez2d-field-pkg-total .ez2d-input-with-addon {
    width: 100%;
}

.ez2d-field-price .ez2d-input-with-addon .ez2d-input,
.ez2d-field-pkg-total .ez2d-input-with-addon .ez2d-input {
    width: 100%;
}

.ez2d-input-addon {
    background: var(--ez2d-primary-soft);
    border: 1px solid var(--ez2d-border-subtle);
    border-radius: var(--ez2d-card-radius);
    padding: .55rem .75rem;
    font-weight: bold;
    color: var(--ez2d-primary-strong);
    white-space: nowrap;
}

/* -----------------------------------------
   PACKAGE TOTAL FIELD
------------------------------------------ */

#ez2d_pkg_total_wrap {
    display: none;
}

#ez2d_pkg_total_wrap .ez2d-input,
#ez2d_package_total {
    background: #f5f5f5;
    font-weight: 600;
}

/* ============================================
   PRODUCTS TABLE  PROPER MULTI-COLUMN GRID
============================================ */

.ez2d-products-table-wrapper {
    position: relative;
    max-width: 100%;
}

/* Bulk actions bar */
.ez2d-bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--ez2d-bg-soft, #f9fafb);
    border: 1px solid var(--ez2d-border-subtle);
    border-radius: var(--ez2d-card-radius);
    margin-bottom: 12px;
}

.ez2d-select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* Table container */
.ez2d-products-table {
    background: #fff;
    border-radius: var(--ez2d-card-radius);
    overflow: hidden;
    border: 1px solid var(--ez2d-border-subtle);
    width: 100%;
    box-sizing: border-box;
}

/* ================================
   PRODUCTS TABLE GRID (DESKTOP)
================================ */

.ez2d-products-table .ez2d-table-head,
.ez2d-products-table .ez2d-table-row {
  display: grid !important;
  grid-template-columns:
    60px          /* checkbox */
    140px         /* category */
    minmax(200px, 2fr)  /* name - flexible */
    110px         /* price */
    70px          /* gst */
    70px          /* pst */
    180px;        /* actions */
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.ez2d-products-table .ez2d-table-head {
  background: var(--ez2d-primary-soft, #dbeafe);
  font-weight: 600;
  color: var(--ez2d-text-strong);
  border-bottom: 2px solid var(--ez2d-border);
}

.ez2d-products-table .ez2d-table-row {
  border-bottom: 1px solid var(--ez2d-border-subtle);
  transition: background .15s ease;
}

.ez2d-products-table .ez2d-table-row:hover {
  background: rgba(0,0,0,0.02);
}

.ez2d-products-table .ez2d-table-row:last-child {
  border-bottom: none;
}

/* Column alignment */
.ez2d-col-select {
  text-align: center;
  justify-self: center;
}

.ez2d-col-category {
  font-size: 14px;
}

.ez2d-col-name {
  font-weight: 500;
}

.ez2d-col-price {
  text-align: right;
  font-weight: 600;
  color: var(--ez2d-primary);
}

.ez2d-col-gst,
.ez2d-col-pst {
  text-align: center;
  justify-self: center;
  font-size: 13px;
}

.ez2d-col-actions {
  display: flex !important;
  gap: 8px;
  justify-content: flex-end;
}#ez2d-products-form .ez2d-form-row:nth-of-type(2) {
        grid-template-columns: auto auto 1.2fr;
    }
    
    .ez2d-field-lesson,
    .ez2d-field-pkg-total {
        grid-column: span 1;
    }
}

/* Mobile: Stack everything */
@media (max-width: 900px) {
    
    /* Form: Stack all fields */
    #ez2d-products-form .ez2d-form-row:nth-of-type(1),
    #ez2d-products-form .ez2d-form-row:nth-of-type(2),
    #ez2d-products-form .ez2d-form-row:nth-of-type(3) {
        grid-template-columns: 1fr !important;
    }
    
    /* Reset all orders on mobile */
    .ez2d-field-category,
    .ez2d-field-name,
    .ez2d-field-price,
    .ez2d-field-lesson,
    .ez2d-field-pkg-total,
    .ez2d-field-tax,
    .ez2d-field-sort,
    .ez2d-field-sku {
        order: 0;
    }

    /* Table: Hide header and stack rows */
    .ez2d-products-table .ez2d-table-head {
        display: none !important;
    }

    .ez2d-products-table .ez2d-table-row {
        grid-template-columns: 1fr !important;
        gap: 8px;
        padding: 16px;
    }

    /* Add labels before each cell on mobile */
    .ez2d-products-table .ez2d-table-row > div::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        margin-right: 8px;
    }

    .ez2d-col-select::before {
        content: "" !important;
    }

    .ez2d-col-actions {
        justify-content: flex-start !important;
        padding-top: 12px;
        border-top: 1px solid var(--ez2d-border-subtle);
    }
    
    .ez2d-col-actions::before {
        content: "" !important;
    }
    
    /* Bulk actions bar on mobile */
    .ez2d-bulk-actions-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .ez2d-select-all-label {
        width: 100%;
    }
    
    #ez2d_bulk_price_btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ez2d-products-table .ez2d-table-row {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border: 1px solid var(--ez2d-border-subtle);
        border-radius: 12px;
        background: #fff;
    }

    .ez2d-products-table .ez2d-table-row > div {
        white-space: normal;
        word-break: break-word;
    }

    .ez2d-products-table .ez2d-col-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .ez2d-products-table-wrapper {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .ez2d-products-table {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        min-width: 0 !important;
    }
    .ez2d-products-table .ez2d-table-head {
        display: none !important;
    }
    .ez2d-products-table .ez2d-table-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
        border: 1px solid var(--ez2d-border-subtle) !important;
        border-radius: 12px !important;
        background: #fff !important;
    }
    .ez2d-products-table .ez2d-table-row > div {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 0.5rem 0 !important;
        white-space: normal !important;
        word-break: break-word !important;
        border-bottom: 1px solid var(--ez2d-border-subtle) !important;
    }
    .ez2d-products-table .ez2d-table-row > div:last-child {
        border-bottom: none !important;
        padding-top: 1rem !important;
    }
}

@media (max-width: 640px) {
    .ez2d-products-table {
        min-width: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .ez2d-product-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .ez2d-product-header-content {
        flex-direction: column;
        text-align: center;
    }

    .ez2d-btn-modern {
        width: 100%;
        justify-content: center;
    }

    .ez2d-modern-modal-dialog {
        width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }

    .ez2d-modern-modal-header,
    .ez2d-modern-form {
        padding: 1.5rem;
    }
}

/* ==========================================
   FULLSCREEN OVERLAY SPINNER
========================================== */

#ez2d-global-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: none;
    z-index: 99999;
    backdrop-filter: blur(3px);
}

.ez2d-overlay-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ez2d-overlay-text {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ez2d-text);
}

/* ==========================================
   SUCCESS TOAST
========================================== */

.ez2d-success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #22c55e;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 100000;
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity .25s ease, transform .25s ease;
}

.ez2d-success-toast.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   MODAL (BULK PRICE UPDATE)
========================================== */

.ez2d-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ez2d-modal-overlay.active {
    display: flex !important;
}

.ez2d-modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    transform: scale(0.92);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}

.ez2d-modal-overlay.active .ez2d-modal-box {
    transform: scale(1);
    opacity: 1;
}

.ez2d-modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--ez2d-danger-soft, #eee);
    border: none;
    font-size: 22px;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
    color: #333;
}

.ez2d-modal-close-btn:hover {
    background: var(--ez2d-danger, #d9534f);
    color: #fff;
}

.ez2d-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ez2d-text-strong);
}

.ez2d-modal-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--ez2d-text);
}

.ez2d-modal-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    cursor: pointer;
}

.ez2d-preview-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: var(--ez2d-bg-elevated, #f9fafb);
    border: 1px solid var(--ez2d-border-subtle);
    max-height: 260px;
    overflow: auto;
}

.ez2d-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ez2d-preview-table th,
.ez2d-preview-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--ez2d-border-subtle);
    text-align: left;
}

.ez2d-muted {
    color: #999;
    font-style: italic;
}

#ez2d_apply_bulk_price {
    width: 100%;
    margin-top: 20px;
}

/* ==========================================
   EZ2D ALERT MODAL
========================================== */

#ez2d-alert-modal .ez2d-modal-box {
    max-width: 380px;
    text-align: center;
}

.ez2d-alert-message {
    margin: 18px 0 22px;
    font-size: 15px;
    color: var(--ez2d-text);
}

/* ==========================================
   FORM ACTIONS
========================================== */

.ez2d-form-actions {
    margin-top: 20px;
}

.ez2d-form-actions-top {
    margin-bottom: 12px;
}

.ez2d-form-actions-main {
    margin-bottom: 12px;
}

.ez2d-form-notice {
    padding: 12px 16px;
    border-radius: var(--ez2d-card-radius);
    font-size: 14px;
    font-weight: 500;
}

.ez2d-notice-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.ez2d-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.ez2d-float-right {
    float: right;
}

/* ==========================================
   FIELD HELP TEXT
========================================== */

.ez2d-field-help {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* ==========================================
   SECTION TITLE
========================================== */

.ez2d-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ez2d-text-strong);
}

/* ==========================================================================
   Spinner Overlay & Success Messages
   ========================================================================== */

#ez2d-products-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    --ez2d-spinner-size: 48px;
    --ez2d-spinner-track: rgba(255, 255, 255, 0.3);
    --ez2d-spinner-head: #fff;
}

#ez2d-products-overlay.active {
    display: flex;
    opacity: 1;
}


#ez2d-products-success {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #22c55e;
}

#ez2d-products-success svg {
    width: 24px;
    height: 24px;
    stroke: #22c55e;
    stroke-width: 3;
    fill: none;
}


/* Confirmation Modal */
.ez2d-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ez2d-confirm-modal.visible {
    opacity: 1;
}

.ez2d-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ez2d-confirm-dialog {
    position: relative;
    z-index: 1000000;
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ez2d-confirm-modal.visible .ez2d-confirm-dialog {
    transform: scale(1);
}

.ez2d-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ez2d-confirm-icon svg {
    width: 32px;
    height: 32px;
    color: #ef4444;
    stroke-width: 2.5;
}

.ez2d-confirm-message {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    line-height: 1.6;
    margin-bottom: 28px;
}

.ez2d-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ez2d-confirm-actions .ez2d-btn {
    min-width: 120px;
    padding: 12px 24px;
}

@media (max-width: 640px) {
    .ez2d-confirm-dialog {
        padding: 24px;
        max-width: 320px;
    }
    .ez2d-confirm-icon {
        width: 56px;
        height: 56px;
    }
    .ez2d-confirm-icon svg {
        width: 28px;
        height: 28px;
    }
    .ez2d-confirm-message {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    .ez2d-confirm-actions {
        flex-direction: column-reverse;
    }
    .ez2d-confirm-actions .ez2d-btn {
        width: 100%;
    }
}

/* ==========================================================================\r
   3D ACTION BUTTONS (Edit & Delete) - PRODUCTS MODULE
   ========================================================================== */

/* Override any existing button styles in products table */
.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 0;
    min-width: unset;
}

.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d:active {
    transform: translateY(1px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Edit Button (Blue) */
.ez2d-products-table .ez2d-col-actions .ez2d-btn-edit-3d {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.ez2d-products-table .ez2d-col-actions .ez2d-btn-edit-3d:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Delete Button (Red) */
.ez2d-products-table .ez2d-col-actions .ez2d-btn-delete-3d {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.ez2d-products-table .ez2d-col-actions .ez2d-btn-delete-3d:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}


.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d.ez2d-product-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Size variants */
.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d.ez2d-sm {
    width: 32px;
    height: 32px;
}

.ez2d-products-table .ez2d-col-actions .ez2d-btn-3d.ez2d-lg {
    width: 40px;
    height: 40px;
}

/* Ensure proper spacing between buttons */
.ez2d-products-table .ez2d-col-actions {
    display: flex !important;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

/* Products modal */
.ez2d-modal {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: none;
}

.ez2d-modal.open {
    display: block;
}

.ez2d-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.ez2d-modal-dialog {
    position: relative;
    z-index: 999999;
    background: #3a3b3f;
    width: min(1280px, 96vw);
    max-height: 90vh;
    overflow: auto;
    margin: 5vh auto;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    padding: 20px 24px 24px;
}

.ez2d-modal-title {
    margin: 0 0 12px 0;
    color: #f8fafc;
}

.ez2d-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
    color: #e2e8f0;
}

.ez2d-modal-dialog .ez2d-products-form-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #e5e7eb;
    padding: 0 !important;
}

.ez2d-modal-dialog .ez2d-products-form-card label {
    color: #e2e8f0;
}

.ez2d-modal-dialog #ez2d-products-form {
    max-width: none;
}

.ez2d-modal-dialog #ez2d_product_reset {
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, 0.6) !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

.ez2d-modal-dialog #ez2d_product_reset:hover {
    border-color: #fff !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

body.ez2d-modal-open {
    overflow: hidden;
}




