/* ============================================================
   MRZ Plugin — Unified Form Styles
   Classic + Modern | RTL/LTR | Theme Adaptive
   All four forms: MRZ Generator, MRZ Parser,
                   ID Generator, ID Validator
   ============================================================ */

/* ── 1. CSS Variable Defaults (overridden per-theme by PHP inline CSS) ── */
:root {
    --mrz-primary:         #4F46E5;
    --mrz-secondary:       #6366F1;
    --mrz-primary-hover:   #4338CA;
    --mrz-primary-rgb:     79, 70, 229;
    --mrz-text:            #111827;
    --mrz-text-muted:      #6b7280;
    --mrz-bg:              #ffffff;
    --mrz-surface:         #f9fafb;
    --mrz-surface-2:       #f4f2f9;
    --mrz-border:          #e5e7eb;
    --mrz-radius:          8px;
    --mrz-radius-lg:       14px;
    --mrz-font:            inherit;
    --mrz-success:         #10b981;
    --mrz-error:           #ef4444;
    /* Back-compat aliases used by existing JS / old CSS */
    --plugin-primary-color:   var(--mrz-primary);
    --plugin-secondary-color: var(--mrz-secondary);
    --plugin-primary-hover:   var(--mrz-primary-hover);
    --plugin-primary-light:   rgba(var(--mrz-primary-rgb), 0.1);
    --plugin-primary-border:  rgba(var(--mrz-primary-rgb), 0.3);
}

/* ── 2. Wrapper base ── */
.mrz-plugin-wrapper {
    font-family:  var(--mrz-font);
    color:        var(--mrz-text);
    box-sizing:   border-box;
}
.mrz-plugin-wrapper *,
.mrz-plugin-wrapper *::before,
.mrz-plugin-wrapper *::after { box-sizing: inherit; }

/* ── 3. Container (shared sizing — styled per variant below) ── */
#generate-form.mrz-plugin-wrapper,
.id-gen-container.mrz-plugin-wrapper {
    max-width:     900px;
    margin:        30px auto;
    border-radius: var(--mrz-radius-lg);
    position:      relative;
}

/* ── 4. Always-LTR technical data (MRZ codes, ID numbers) ── */
.mrz-plugin-wrapper #result1,
.mrz-plugin-wrapper #result2,
.mrz-plugin-wrapper #result3,
.mrz-plugin-wrapper textarea#txtar-nrz,
.mrz-plugin-wrapper .result-id {
    direction:    ltr !important;
    unicode-bidi: embed;
    text-align:   left;
}

/* ── 5. Layout ── */
.mrz-plugin-wrapper .rui-flex {
    display:        flex;
    flex-direction: row;
    flex-wrap:      wrap;
    padding:        0 6px;
    margin:         4px 0;
}
.mrz-plugin-wrapper .rui-flex.dir-row { gap: 18px; }
.mrz-plugin-wrapper .rui-flex > * { flex: 1; min-width: 170px; }
.mrz-plugin-wrapper .rui-group { position: relative; margin: 1.4rem 0; }
.mrz-plugin-wrapper .rui-form-textline { margin-top: 8px; }
.mrz-plugin-wrapper .id-gen-row {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap:                   18px;
    margin-bottom:         18px;
}
.mrz-plugin-wrapper .id-gen-section { margin-bottom: 26px; }
.mrz-plugin-wrapper .id-gen-label { display: block; margin-bottom: 18px; }
.mrz-plugin-wrapper .id-gen-dynamic { margin-top: 4px; }

/* ── 6. Labels ── */
.mrz-plugin-wrapper label,
.mrz-plugin-wrapper .label-text,
.mrz-plugin-wrapper .bastiangLabel,
.mrz-plugin-wrapper label.col-md-4.control-label {
    font-family:   var(--mrz-font);
    font-size:     13.5px;
    font-weight:   600;
    color:         var(--mrz-text);
    text-transform: capitalize;
    max-width:     100% !important;
    flex:          auto;
    display:       block;
    margin-bottom: 5px;
    line-height:   1.5;
}
.mrz-plugin-wrapper .label-text { display: block; margin-bottom: 7px; }

/* ── 7. Inputs (base sizing) ── */
.mrz-plugin-wrapper input[type="text"],
.mrz-plugin-wrapper input[type="number"],
.mrz-plugin-wrapper input[type="date"],
.mrz-plugin-wrapper input[type="search"],
.mrz-plugin-wrapper textarea,
.mrz-plugin-wrapper .id-gen-input {
    display:     block;
    width:       100%;
    max-width:   100%;
    font-family: var(--mrz-font);
    font-size:   15px;
    font-weight: 400;
    color:       var(--mrz-text) !important;
    line-height: 1.5;
    border-radius: var(--mrz-radius);
    transition:  border-color .2s, background-color .2s, box-shadow .2s;
    outline:     none;
    height:      auto;
    min-height:  2.4em;
}

/* ── 8. Selects (base) ── */
.mrz-plugin-wrapper select,
.mrz-plugin-wrapper .bastiangSelect,
.mrz-plugin-wrapper .id-gen-select {
    display:     block;
    width:       100%;
    font-family: var(--mrz-font);
    font-size:   15px;
    color:       var(--mrz-text) !important;
    appearance:  none;
    -webkit-appearance: none;
    cursor:      pointer;
    border-radius: var(--mrz-radius);
    transition:  all .2s;
    outline:     none;
    height:      auto;
    min-height:  2.4em;
}
.mrz-plugin-wrapper select option {
    background: #fff;
    color: var(--mrz-text);
}
/* RTL: mirror dropdown chevron */
.mrz-plugin-wrapper[dir="rtl"] select,
.mrz-plugin-wrapper[dir="rtl"] .bastiangSelect,
.mrz-plugin-wrapper[dir="rtl"] .id-gen-select {
    background-position: left 12px center !important;
    padding-right:  14px !important;
    padding-left:   40px !important;
}

/* ── 9. Textarea ── */
.mrz-plugin-wrapper textarea#txtar-nrz {
    font-family: 'Courier New', 'Consolas', monospace !important;
    width:       100%;
    resize:      vertical;
    min-height:  90px;
    padding:     12px 14px;
}

/* ── 10. Result monospace inputs ── */
.mrz-plugin-wrapper #result1,
.mrz-plugin-wrapper #result2,
.mrz-plugin-wrapper #result3 {
    font-family: 'Courier New', 'Consolas', monospace !important;
    font-size:   15px;
    width:       100%;
    padding:     10px 14px;
    border-radius: var(--mrz-radius);
    height:      auto;
}
.mrz-plugin-wrapper .genGony { margin-top: 8px; }
.mrz-plugin-wrapper .genGony input { font-size: 15px; }

/* ── 11. Controls / actions row ── */
.mrz-plugin-wrapper .controls,
.mrz-plugin-wrapper .id-gen-actions {
    margin:     18px 0 0;
    background: transparent !important;
    padding:    0;
}

/* ── 12. Submit buttons (shared sizing) ── */
.mrz-plugin-wrapper button#generate-now,
.mrz-plugin-wrapper button#parse-now,
.mrz-plugin-wrapper .id-gen-btn-primary,
.mrz-plugin-wrapper #generate-btn,
.mrz-plugin-wrapper #validate-btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    width:           100%;
    height:          52px;
    padding:         0 32px;
    font-family:     var(--mrz-font);
    font-size:       17px;
    font-weight:     600;
    border:          none;
    border-radius:   var(--mrz-radius);
    cursor:          pointer;
    letter-spacing:  .3px;
    transition:      all .25s ease;
    text-transform:  none;
}
.mrz-plugin-wrapper button#generate-now:disabled,
.mrz-plugin-wrapper .id-gen-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── 13. General button (copy etc.) ── */
.mrz-plugin-wrapper .id-gen-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    padding:         10px 22px;
    font-family:     var(--mrz-font);
    font-size:       15px;
    font-weight:     600;
    border-radius:   var(--mrz-radius);
    cursor:          pointer;
    transition:      all .2s;
    border:          none;
}
.mrz-plugin-wrapper .id-gen-btn-copy {
    padding:   9px 18px;
    font-size: 14px;
}
.mrz-plugin-wrapper .id-gen-btn-copy.copied {
    background: var(--mrz-success) !important;
    color: #fff !important;
}
.mrz-plugin-wrapper .btn-icon { width: 20px; height: 20px; }
.mrz-plugin-wrapper #copy1,
.mrz-plugin-wrapper #copy2 { cursor: pointer; font-size: 15px !important; }

/* ── 14. Custom checkbox ── */
.mrz-plugin-wrapper .custom-checkbox {
    position: absolute;
    z-index: -1;
    opacity: 0;
}
.mrz-plugin-wrapper .custom-checkbox + label {
    display:     inline-flex;
    align-items: center;
    user-select: none;
    cursor:      pointer;
    font-weight: 400;
}
.mrz-plugin-wrapper .custom-checkbox + label::before {
    content:       '';
    display:       inline-block;
    width:         1.05em;
    height:        1.05em;
    flex-shrink:   0;
    flex-grow:     0;
    border:        2px solid var(--mrz-border);
    border-radius: 4px;
    margin-inline-end: .5em;
    background-repeat:   no-repeat;
    background-position: center;
    background-size:     60% 60%;
    transition:    all .15s;
}
.mrz-plugin-wrapper .custom-checkbox:not(:disabled):not(:checked) + label:hover::before {
    border-color: var(--mrz-primary);
}
.mrz-plugin-wrapper .custom-checkbox:checked + label::before {
    border-color:      var(--mrz-primary);
    background-color:  var(--mrz-primary);
    background-image:  url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}
.mrz-plugin-wrapper .custom-checkbox:disabled + label::before {
    background-color: var(--mrz-surface);
    border-color:     var(--mrz-border);
}
.mrz-plugin-wrapper .checkbox { margin-bottom: .75em; }
.mrz-plugin-wrapper .unvelib { user-select: none; -webkit-user-select: none; }

/* ── 15. ID form header ── */
.mrz-plugin-wrapper .id-gen-header { margin-bottom: 34px; }
.mrz-plugin-wrapper .id-gen-title {
    font-size:   26px;
    font-weight: 700;
    color:       var(--mrz-text);
    margin:      0 0 9px;
    display:     flex;
    align-items: center;
    gap:         10px;
}
.mrz-plugin-wrapper .id-gen-icon {
    width:  30px;
    height: 30px;
    color:  var(--mrz-primary);
    flex-shrink: 0;
}
.mrz-plugin-wrapper .id-gen-subtitle { font-size: 15px; color: var(--mrz-text-muted); margin: 0; }

/* ── 16. Generator field groups ── */
.mrz-plugin-wrapper .generator-fields { padding: 20px; border-radius: var(--mrz-radius-lg); margin-bottom: 20px; }

/* ── 17. Info boxes ── */
.mrz-plugin-wrapper .id-gen-info { padding: 18px 20px; border-radius: var(--mrz-radius); }
.mrz-plugin-wrapper .id-gen-info p { margin: 5px 0; line-height: 1.6; font-size: 14px; }
.mrz-plugin-wrapper .id-gen-info strong { font-weight: 700; }

/* ── 18. Result section ── */
.mrz-plugin-wrapper .id-gen-result { margin-top: 34px; }
.mrz-plugin-wrapper .result-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   12px;
    flex-wrap:       wrap;
    gap:             10px;
}
.mrz-plugin-wrapper .result-title { font-size: 17px; font-weight: 700; color: var(--mrz-text); margin: 0; }
.mrz-plugin-wrapper .result-content { padding: 22px; border-radius: var(--mrz-radius-lg); }
.mrz-plugin-wrapper .result-output,
.mrz-plugin-wrapper .validation-output { font-size: 15px; color: var(--mrz-text); }
.mrz-plugin-wrapper .result-success,
.mrz-plugin-wrapper .result-error { text-align: center; }
.mrz-plugin-wrapper .result-badge {
    display:        inline-block;
    padding:        5px 15px;
    border-radius:  50px;
    font-size:      12px;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom:  14px;
}
.mrz-plugin-wrapper .result-badge-success { background: var(--mrz-success); color: #fff; }
.mrz-plugin-wrapper .result-badge-error   { background: var(--mrz-error);   color: #fff; }
.mrz-plugin-wrapper .result-id {
    font-size:     26px;
    font-weight:   700;
    font-family:   'Courier New', monospace;
    letter-spacing: 2px;
    color:         var(--mrz-primary);
    margin:        16px 0;
    padding:       16px;
    border-radius: var(--mrz-radius);
    border:        2px solid var(--mrz-primary);
    word-break:    break-all;
    text-align:    center;
}
.mrz-plugin-wrapper .result-meta {
    display:         flex;
    justify-content: center;
    gap:             22px;
    margin:          14px 0;
    flex-wrap:       wrap;
}
.mrz-plugin-wrapper .meta-item { font-size: 13px; color: var(--mrz-text-muted); }
.mrz-plugin-wrapper .result-components { margin-top: 22px; }
.mrz-plugin-wrapper .result-components h4 { font-size: 14px; font-weight: 700; color: var(--mrz-text); margin-bottom: 10px; }
.mrz-plugin-wrapper .result-components ul { list-style: none; padding: 0; margin: 0; }
.mrz-plugin-wrapper .result-components li {
    padding:      9px 13px;
    border-radius: var(--mrz-radius);
    margin-bottom: 6px;
    font-size:    13.5px;
    color:        var(--mrz-text);
    border-inline-start: 3px solid var(--mrz-primary);
    background:   rgba(var(--mrz-primary-rgb), 0.06);
}
.mrz-plugin-wrapper .result-components strong { color: var(--mrz-primary); font-weight: 600; }
.mrz-plugin-wrapper .error-message { font-size: 15px; color: var(--mrz-error); margin: 14px 0; }
.mrz-plugin-wrapper .error-list { list-style: none; padding: 0; margin: 14px 0 0; }
.mrz-plugin-wrapper .error-list li {
    padding:      9px 13px;
    background:   #fef2f2;
    border-radius: var(--mrz-radius);
    margin-bottom: 6px;
    color:        #b91c1c;
    border-inline-start: 3px solid var(--mrz-error);
}

/* ── 19. Loaders ── */
.mrz-plugin-wrapper .id-gen-loader {
    position:      absolute;
    inset:         0;
    background:    rgba(255,255,255,.92);
    display:       flex;
    align-items:   center;
    justify-content: center;
    border-radius: var(--mrz-radius-lg);
    z-index:       100;
}
.mrz-plugin-wrapper .loader-spinner {
    width:        52px;
    height:       52px;
    border:       4px solid var(--mrz-surface);
    border-top-color: var(--mrz-primary);
    border-radius: 50%;
    animation:    mrz-spin .75s linear infinite;
}
@keyframes mrz-spin { to { transform: rotate(360deg); } }

/* Global page-level ripple loader */
#lds-ripple {
    position:        fixed;
    inset:           0;
    z-index:         99999;
    display:         none;
    background:      rgba(255,255,255,.88);
    align-items:     center;
    justify-content: center;
    text-align:      center;
}
.lds-ripple { display: inline-block; position: relative; width: 80px; height: 80px; margin-top: 45vh; }
.lds-ripple div {
    position:      absolute;
    border:        4px solid var(--mrz-primary);
    opacity:       1;
    border-radius: 50%;
    animation:     mrz-ripple 1s cubic-bezier(0,.2,.8,1) infinite;
}
.lds-ripple div:nth-child(2) { animation-delay: -.5s; }
@keyframes mrz-ripple {
    0%,4.9% { top:36px;left:36px;width:0;height:0;opacity:0; }
    5%       { top:36px;left:36px;width:0;height:0;opacity:1; }
    100%     { top:0;left:0;width:72px;height:72px;opacity:0; }
}

/* ── 20. Barcodes & QR ── */
.mrz-plugin-wrapper .barcodes-section {
    margin-top: 22px; padding: 16px;
    background: var(--mrz-surface); border-radius: var(--mrz-radius); border: 1px solid var(--mrz-border);
}
.mrz-plugin-wrapper .barcodes-section h4 { color: var(--mrz-text); margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.mrz-plugin-wrapper .barcode-item { background: #fff; padding: 13px; border-radius: var(--mrz-radius); text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.mrz-plugin-wrapper .barcode-item svg { max-width: 100%; height: auto; }
.mrz-plugin-wrapper .download-barcode-btn {
    padding: 5px 13px; background: var(--mrz-primary); color: #fff;
    border: none; border-radius: var(--mrz-radius); cursor: pointer; font-size: 12px; font-weight: 600; transition: background .2s;
}
.mrz-plugin-wrapper .download-barcode-btn:hover { background: var(--mrz-primary-hover); }
.mrz-plugin-wrapper .qr-image {
    text-align: center; background: #fff; padding: 13px;
    border-radius: var(--mrz-radius); box-shadow: 0 2px 8px rgba(0,0,0,.1); max-width: 100%; overflow-x: auto; margin-bottom: 1.4rem;
}
.mrz-plugin-wrapper .qr-image svg { max-width: 100%; height: auto; }

/* ── 21. Disclaimer ── */
.mrz-plugin-wrapper .id-gen-disclaimer {
    margin-top: 28px; padding: 14px 18px;
    border-radius: var(--mrz-radius); border-inline-start: 4px solid #fbbf24; background: #fffbeb;
}
.mrz-plugin-wrapper .id-gen-disclaimer p { margin: 0; font-size: 13px; color: var(--mrz-text-muted); line-height: 1.6; }
.mrz-plugin-wrapper .id-gen-disclaimer strong { color: #d97706; font-weight: 700; }

/* ── 22. Misc ── */
.mrz-plugin-wrapper #typePrecision { text-transform: uppercase; }
.mrz-plugin-wrapper #errorMsg { color: var(--mrz-error); font-size: 13px; margin: 4px 0; }

/* ── 23. Responsive ── */
@media (max-width: 768px) {
    #generate-form.mrz-plugin-wrapper,
    .id-gen-container.mrz-plugin-wrapper { padding: 20px !important; margin: 14px !important; }
    .mrz-plugin-wrapper .id-gen-row { grid-template-columns: 1fr; }
    .mrz-plugin-wrapper .rui-flex.dir-row { flex-direction: column; }
    .mrz-plugin-wrapper .result-meta { flex-direction: column; gap: 7px; }
    .mrz-plugin-wrapper .id-gen-title { font-size: 20px; }
    .mrz-plugin-wrapper .result-id { font-size: 18px; letter-spacing: 1px; }
}
@media (max-width: 480px) {
    .mrz-plugin-wrapper .id-gen-title { font-size: 17px; flex-direction: column; }
    .mrz-plugin-wrapper .result-header { flex-direction: column; align-items: flex-start; }
}

/* ── 24. Small-screen result text ── */
@media (max-width: 625px) {
    .mrz-plugin-wrapper .genGony input { font-size: 12px !important; }
}

/* ── 25. Status bar (subscription / wallet / credits) ── */
#mrz-user-status-bar { margin-bottom: 16px; }

.mrz-status-bar {
    display:         flex;
    align-items:     center;
    gap:             10px;
    padding:         10px 16px;
    margin-bottom:   16px;
    border-radius:   6px;
    font-size:       14px;
    border-width:    1px;
    border-style:    solid;
}
.mrz-status-bar a { font-weight: 600; }
.mrz-status-icon  { font-size: 18px; flex-shrink: 0; }

.mrz-status-ok {
    background:   #d1fae5;
    border-color: #059669;
    color:        #065f46;
}
.mrz-status-ok a { color: #065f46; }

.mrz-status-warning {
    background:   #fef3c7;
    border-color: #d97706;
    color:        #92400e;
}
.mrz-status-warning a { color: #92400e; }

.mrz-status-error {
    background:   #fee2e2;
    border-color: #dc2626;
    color:        #991b1b;
}
.mrz-status-error a { color: #991b1b; }

/* ── 26. Multi-Country License Form (mcl-*) ── */
.mcl-generator.mrz-plugin-wrapper {
    max-width:     900px;
    margin:        20px auto;
    padding:       30px;
    background:    linear-gradient(135deg, var(--mrz-primary) 0%, var(--mrz-secondary) 100%);
    border-radius: var(--mrz-radius-lg);
    box-shadow:    0 10px 40px rgba(var(--mrz-primary-rgb), .25);
    color:         #fff;
    position:      relative;
}
.mcl-generator.mrz-plugin-wrapper .mrz-status-bar a { color: inherit; text-decoration: underline; }

.mcl-title {
    text-align:   center;
    font-size:    28px;
    font-weight:  700;
    margin-bottom: 28px;
    text-shadow:  0 2px 10px rgba(0,0,0,.2);
}
.mcl-form-group  { margin-bottom: 20px; }
.mcl-label {
    display:        block;
    font-weight:    600;
    margin-bottom:  8px;
    font-size:      13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color:          rgba(255,255,255,.9);
}
.mcl-input,
.mcl-select {
    width:         100%;
    padding:       12px 15px;
    border:        2px solid rgba(255,255,255,.3);
    border-radius: var(--mrz-radius);
    font-size:     15px;
    background:    rgba(255,255,255,.9);
    color:         #333;
    transition:    all .3s ease;
    font-family:   var(--mrz-font);
    outline:       none;
}
.mcl-input:focus,
.mcl-select:focus {
    border-color: #fff;
    background:   #fff;
    box-shadow:   0 0 0 3px rgba(255,255,255,.3);
}
.mcl-row {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap:                   15px;
}
.mcl-section-title {
    font-size:     17px;
    font-weight:   700;
    margin:        24px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,.3);
}
.mcl-btn {
    background:     rgba(255,255,255,.95);
    color:          var(--mrz-primary);
    padding:        15px 40px;
    border:         none;
    border-radius:  var(--mrz-radius);
    font-size:      16px;
    font-weight:    700;
    cursor:         pointer;
    transition:     all .3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width:          100%;
    margin-top:     10px;
}
.mcl-btn:hover {
    background: #fff;
    transform:  translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,255,255,.3);
}
.mcl-btn:active { transform: translateY(0); }

/* -- Loading -- */
.mcl-loading { text-align: center; padding: 20px; display: none; }
.mcl-loading.show { display: block; }
.mcl-spinner {
    border:        4px solid rgba(255,255,255,.3);
    border-top:    4px solid #fff;
    border-radius: 50%;
    width:         50px;
    height:        50px;
    animation:     mrz-spin .8s linear infinite;
    margin:        0 auto 15px;
}

/* -- Error -- */
.mcl-error {
    background:    rgba(239,68,68,.85);
    color:         #fff;
    padding:       14px;
    border-radius: var(--mrz-radius);
    margin-top:    14px;
    display:       none;
}
.mcl-error.show { display: block; }

/* -- Result / card -- */
.mcl-result {
    margin-top:    28px;
    padding:       22px;
    background:    rgba(255,255,255,.08);
    border-radius: var(--mrz-radius-lg);
    display:       none;
    animation:     mrz-slide-in .4s ease;
}
.mcl-result.show { display: block; }

.mcl-card {
    background:    linear-gradient(135deg, #1c232a 0%, #393d46 100%);
    color:         #fff;
    padding:       24px;
    border-radius: var(--mrz-radius);
    border:        2px solid rgba(255,255,255,.25);
    margin-bottom: 20px;
}
.mcl-card-header {
    border-bottom:  2px solid rgba(255,255,255,.2);
    padding-bottom: 14px;
    margin-bottom:  18px;
}
.mcl-card-title {
    font-size:   22px;
    font-weight: 700;
    color:       var(--mrz-primary);
    margin:      0;
}
.mcl-info-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
    gap:                   14px;
    margin-bottom:         14px;
}
.mcl-info-label {
    font-size:      11px;
    color:          var(--mrz-primary);
    text-transform: uppercase;
    margin-bottom:  3px;
}
.mcl-info-value { font-size: 15px; font-weight: 600; }
.mcl-info-value-lg { font-size: 22px; font-family: 'Courier New', monospace; color: var(--mrz-primary); }
.mcl-info-value-danger { color: var(--mrz-error); }

.mcl-barcode-section {
    margin-top:    18px;
    padding-top:   18px;
    border-top:    2px solid rgba(255,255,255,.15);
}
.mcl-barcode-title { font-size: 15px; color: var(--mrz-primary); margin-bottom: 14px; font-weight: 700; }
.mcl-barcode-container {
    background:     #fff;
    padding:        14px;
    border-radius:  var(--mrz-radius);
    display:        inline-block;
    margin:         8px 8px 8px 0;
}
.mcl-barcode-type-label { font-size: 11px; color: var(--mrz-primary); margin-bottom: 5px; }
.mcl-download-group { margin-top: 8px; }
.mcl-download-btn {
    background:     var(--mrz-primary);
    color:          #fff;
    padding:        7px 14px;
    border:         none;
    border-radius:  var(--mrz-radius);
    font-size:      12px;
    font-weight:    600;
    cursor:         pointer;
    transition:     all .25s;
    margin:         4px 4px 0 0;
    display:        inline-block;
}
.mcl-download-btn:hover {
    background: var(--mrz-primary-hover);
    transform:  translateY(-1px);
}

/* field visibility (JS toggles these) */
.field-usa,
.field-canada,
.field-russia { display: none; }

@media (max-width: 768px) {
    .mcl-generator.mrz-plugin-wrapper { padding: 20px; margin: 14px; }
    .mcl-row { grid-template-columns: 1fr; }
}

/* ── 27. Access-denied block ── */
.mrz-access-denied {
    padding:       24px 20px;
    background:    #fff3cd;
    border:        2px solid #ffc107;
    border-radius: var(--mrz-radius-lg);
    margin:        20px 0;
    text-align:    center;
}
.mrz-access-denied-icon  { font-size: 48px; margin-bottom: 14px; }
.mrz-access-denied-title {
    color:       #856404;
    margin:      8px 0;
    font-size:   20px;
    font-weight: 700;
}
.mrz-access-denied-msg {
    color:       #856404;
    font-size:   16px;
    margin:      14px 0;
    line-height: 1.6;
}
.mrz-access-denied-btn {
    display:         inline-block;
    padding:         12px 30px;
    background:      var(--mrz-primary);
    color:           #fff !important;
    text-decoration: none;
    border-radius:   var(--mrz-radius);
    font-weight:     700;
    margin-top:      14px;
    transition:      background .2s;
}
.mrz-access-denied-btn:hover { background: var(--mrz-primary-hover); }


/* ═══════════════════════════════════════════════════════════════
   CLASSIC  (body.mrz-style-classic)
   Tailwind-inspired — clean, sharp, professional
   ═══════════════════════════════════════════════════════════════ */

/* -- Container -- */
body.mrz-style-classic #generate-form.mrz-plugin-wrapper,
body.mrz-style-classic .id-gen-container.mrz-plugin-wrapper {
    background:    #fff;
    padding:       36px;
    border:        1.5px solid var(--mrz-border);
    box-shadow:    0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.04);
}

/* -- Header -- */
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-header {
    border-bottom: 2px solid var(--mrz-border);
    padding-bottom: 20px;
    margin-bottom:  26px;
    text-align:    start;
}
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-title {
    justify-content: flex-start;
    color: var(--mrz-text);
}

/* -- Inputs -- */
body.mrz-style-classic .mrz-plugin-wrapper input[type="text"],
body.mrz-style-classic .mrz-plugin-wrapper input[type="number"],
body.mrz-style-classic .mrz-plugin-wrapper input[type="date"],
body.mrz-style-classic .mrz-plugin-wrapper input[type="search"],
body.mrz-style-classic .mrz-plugin-wrapper textarea,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-input {
    background: var(--mrz-surface);
    border:     1.5px solid var(--mrz-border);
    padding:    10px 13px;
    color:      var(--mrz-text) !important;
}
body.mrz-style-classic .mrz-plugin-wrapper input:focus,
body.mrz-style-classic .mrz-plugin-wrapper textarea:focus,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-input:focus {
    background:  #fff;
    border-color: var(--mrz-primary);
    box-shadow:  0 0 0 3px rgba(var(--mrz-primary-rgb), .15);
}

/* -- Selects -- */
body.mrz-style-classic .mrz-plugin-wrapper select,
body.mrz-style-classic .mrz-plugin-wrapper .bastiangSelect,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-select {
    background-color:    var(--mrz-surface);
    border:              1.5px solid var(--mrz-border);
    color:               var(--mrz-text) !important;
    padding:             10px 40px 10px 13px;
    background-image:    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat:   no-repeat;
    background-position: right 12px center;
    background-size:     18px;
}
body.mrz-style-classic .mrz-plugin-wrapper[dir="rtl"] select,
body.mrz-style-classic .mrz-plugin-wrapper[dir="rtl"] .bastiangSelect,
body.mrz-style-classic .mrz-plugin-wrapper[dir="rtl"] .id-gen-select {
    background-position: left 12px center;
    padding-right: 13px;
    padding-left:  40px;
}
body.mrz-style-classic .mrz-plugin-wrapper select:focus,
body.mrz-style-classic .mrz-plugin-wrapper .bastiangSelect:focus,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-select:focus {
    background-color: #fff;
    border-color:     var(--mrz-primary);
    box-shadow:       0 0 0 3px rgba(var(--mrz-primary-rgb), .15);
}
body.mrz-style-classic .mrz-plugin-wrapper select:hover,
body.mrz-style-classic .mrz-plugin-wrapper .bastiangSelect:hover,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-select:hover { background-color: #fff; }

/* -- Buttons -- */
body.mrz-style-classic .mrz-plugin-wrapper button#generate-now,
body.mrz-style-classic .mrz-plugin-wrapper button#parse-now,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-btn-primary,
body.mrz-style-classic .mrz-plugin-wrapper #generate-btn,
body.mrz-style-classic .mrz-plugin-wrapper #validate-btn {
    background: var(--mrz-primary) !important;
    color:      #fff !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
body.mrz-style-classic .mrz-plugin-wrapper button#generate-now:hover,
body.mrz-style-classic .mrz-plugin-wrapper button#parse-now:hover,
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-btn-primary:hover:not(:disabled),
body.mrz-style-classic .mrz-plugin-wrapper #generate-btn:hover,
body.mrz-style-classic .mrz-plugin-wrapper #validate-btn:hover {
    background: var(--mrz-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(var(--mrz-primary-rgb), .28);
    transform:  translateY(-1px);
}

/* -- Copy button -- */
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-btn-copy {
    background:   transparent;
    color:        var(--mrz-primary);
    border:       1.5px solid var(--mrz-primary);
    border-radius: var(--mrz-radius);
}
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-btn-copy:hover {
    background: var(--mrz-primary);
    color:      #fff;
}

/* -- Result fields -- */
body.mrz-style-classic .mrz-plugin-wrapper #result1,
body.mrz-style-classic .mrz-plugin-wrapper #result2,
body.mrz-style-classic .mrz-plugin-wrapper #result3 {
    color:      var(--mrz-primary) !important;
    background: var(--mrz-surface);
    border:     1.5px solid var(--mrz-border);
}
body.mrz-style-classic .mrz-plugin-wrapper .result-content {
    background: var(--mrz-surface);
    border:     1.5px solid var(--mrz-border);
}

/* -- Generator fields box -- */
body.mrz-style-classic .mrz-plugin-wrapper .generator-fields {
    background: var(--mrz-surface);
    border:     1px solid var(--mrz-border);
}

/* -- Info box -- */
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-info {
    background:          rgba(var(--mrz-primary-rgb), .06);
    border-inline-start: 3px solid var(--mrz-primary);
    color:               var(--mrz-text);
    border-radius:       0 var(--mrz-radius) var(--mrz-radius) 0;
}
body.mrz-style-classic .mrz-plugin-wrapper[dir="rtl"] .id-gen-info {
    border-radius: var(--mrz-radius) 0 0 var(--mrz-radius);
}
body.mrz-style-classic .mrz-plugin-wrapper .id-gen-info p { color: var(--mrz-text); }

/* -- Copy icon colours -- */
body.mrz-style-classic .mrz-plugin-wrapper #copy1,
body.mrz-style-classic .mrz-plugin-wrapper #copy2 { color: var(--mrz-primary); }


/* ═══════════════════════════════════════════════════════════════
   MODERN  (body.mrz-style-modern)
   Gradients · depth · smooth animations
   ═══════════════════════════════════════════════════════════════ */

/* -- Container -- */
body.mrz-style-modern #generate-form.mrz-plugin-wrapper,
body.mrz-style-modern .id-gen-container.mrz-plugin-wrapper {
    background: linear-gradient(158deg, #ffffff 0%, #f8f7ff 100%);
    padding:    40px;
    border:     1px solid rgba(var(--mrz-primary-rgb), .1);
    box-shadow: 0 20px 60px rgba(var(--mrz-primary-rgb), .1),
                0 4px 16px rgba(0,0,0,.05);
}

/* -- Header -- */
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-header {
    margin-bottom: 38px;
    text-align:    center;
}
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-title {
    font-weight: 800;
    font-size:   28px;
    background:  linear-gradient(135deg, var(--mrz-primary) 0%, var(--mrz-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    justify-content: center;
}
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-subtitle { font-size: 15.5px; }

/* -- Inputs -- */
body.mrz-style-modern .mrz-plugin-wrapper input[type="text"],
body.mrz-style-modern .mrz-plugin-wrapper input[type="number"],
body.mrz-style-modern .mrz-plugin-wrapper input[type="date"],
body.mrz-style-modern .mrz-plugin-wrapper input[type="search"],
body.mrz-style-modern .mrz-plugin-wrapper textarea,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-input {
    background: var(--mrz-surface-2);
    border:     2px solid transparent;
    padding:    12px 15px;
    color:      var(--mrz-text) !important;
}
body.mrz-style-modern .mrz-plugin-wrapper input:focus,
body.mrz-style-modern .mrz-plugin-wrapper textarea:focus,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-input:focus {
    background:  #fff;
    border-color: var(--mrz-primary);
    box-shadow:  0 0 0 4px rgba(var(--mrz-primary-rgb), .12);
}
body.mrz-style-modern .mrz-plugin-wrapper input:hover,
body.mrz-style-modern .mrz-plugin-wrapper textarea:hover,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-input:hover { background: #fff; }

/* -- Selects -- */
body.mrz-style-modern .mrz-plugin-wrapper select,
body.mrz-style-modern .mrz-plugin-wrapper .bastiangSelect,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-select {
    background-color:    var(--mrz-surface-2);
    border:              2px solid transparent;
    color:               var(--mrz-text) !important;
    padding:             12px 40px 12px 15px;
    background-image:    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat:   no-repeat;
    background-position: right 12px center;
    background-size:     18px;
}
body.mrz-style-modern .mrz-plugin-wrapper[dir="rtl"] select,
body.mrz-style-modern .mrz-plugin-wrapper[dir="rtl"] .bastiangSelect,
body.mrz-style-modern .mrz-plugin-wrapper[dir="rtl"] .id-gen-select {
    background-position: left 12px center;
    padding-right: 15px;
    padding-left:  40px;
}
body.mrz-style-modern .mrz-plugin-wrapper select:focus,
body.mrz-style-modern .mrz-plugin-wrapper .bastiangSelect:focus,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-select:focus {
    background-color: #fff;
    border-color:     var(--mrz-primary);
    box-shadow:       0 0 0 4px rgba(var(--mrz-primary-rgb), .12);
}
body.mrz-style-modern .mrz-plugin-wrapper select:hover,
body.mrz-style-modern .mrz-plugin-wrapper .bastiangSelect:hover,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-select:hover { background-color: #fff; }

/* -- Buttons (gradient) -- */
body.mrz-style-modern .mrz-plugin-wrapper button#generate-now,
body.mrz-style-modern .mrz-plugin-wrapper button#parse-now,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-btn-primary,
body.mrz-style-modern .mrz-plugin-wrapper #generate-btn,
body.mrz-style-modern .mrz-plugin-wrapper #validate-btn {
    background: linear-gradient(135deg, var(--mrz-primary) 0%, var(--mrz-secondary) 100%) !important;
    color:      #fff !important;
    box-shadow: 0 6px 24px rgba(var(--mrz-primary-rgb), .32);
}
body.mrz-style-modern .mrz-plugin-wrapper button#generate-now:hover,
body.mrz-style-modern .mrz-plugin-wrapper button#parse-now:hover,
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-btn-primary:hover:not(:disabled),
body.mrz-style-modern .mrz-plugin-wrapper #generate-btn:hover,
body.mrz-style-modern .mrz-plugin-wrapper #validate-btn:hover {
    box-shadow: 0 10px 30px rgba(var(--mrz-primary-rgb), .44);
    transform:  translateY(-2px);
}

/* -- Copy button -- */
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-btn-copy {
    background: var(--mrz-surface-2);
    color:      var(--mrz-primary);
    border:     none;
    border-radius: var(--mrz-radius);
}
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-btn-copy:hover {
    background: var(--mrz-primary);
    color: #fff;
}

/* -- Result fields -- */
body.mrz-style-modern .mrz-plugin-wrapper #result1,
body.mrz-style-modern .mrz-plugin-wrapper #result2,
body.mrz-style-modern .mrz-plugin-wrapper #result3 {
    color:      var(--mrz-primary) !important;
    background: rgba(var(--mrz-primary-rgb), .06);
    border:     2px solid rgba(var(--mrz-primary-rgb), .2);
}
body.mrz-style-modern .mrz-plugin-wrapper .result-content {
    background: linear-gradient(135deg, #f9f7fc 0%, #fff 100%);
    border:     2px solid #e8e3f0;
    border-radius: 12px;
}
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-result {
    animation: mrz-slide-in .4s ease;
}
@keyframes mrz-slide-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
body.mrz-style-modern .mrz-plugin-wrapper .result-components li {
    transition: background .18s ease;
}
body.mrz-style-modern .mrz-plugin-wrapper .result-components li:hover {
    background: rgba(var(--mrz-primary-rgb), .11);
}

/* -- Generator fields box -- */
body.mrz-style-modern .mrz-plugin-wrapper .generator-fields {
    background: linear-gradient(135deg, #f9f7fc 0%, #fff 100%);
    border:     1px solid #e8e3f0;
}

/* -- Info box (gradient) -- */
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-info {
    background: linear-gradient(135deg, var(--mrz-primary) 0%, var(--mrz-secondary) 100%);
    color:      #fff;
    border-radius: 10px;
}
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-info p { color: rgba(255,255,255,.9); }
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-info strong { color: #fff; }

/* -- Copy icon colours -- */
body.mrz-style-modern .mrz-plugin-wrapper #copy1,
body.mrz-style-modern .mrz-plugin-wrapper #copy2 { color: var(--mrz-primary); }

/* -- Disclaimer box accent -- */
body.mrz-style-modern .mrz-plugin-wrapper .id-gen-disclaimer {
    background: #fffbeb;
    border-inline-start-color: var(--mrz-primary);
}
