/* Edwiser Store - Reusable Components */

/*
 * The declarations below intentionally use `!important` to override styles
 * coming from the active Moodle theme (Boost, RemUI, Classic and downstream
 * forks) and from Bootstrap utility classes. The plugin's host page selectors
 * (`#page-local-edwiserstore-*`, `.path-local-edwiserstore`) already provide
 * high specificity, but theme stylesheets load after this file and frequently
 * target the same shells, so `!important` is the documented escape hatch.
 */
/* stylelint-disable declaration-no-important */

/* Toggle switches, modals, forms, editor panels */

/* Delete Modal Base */
.local-edwiserstore-delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* Product editor sidebar modal (simplified) */
.path-local-edwiserstore .edwiser-product-editor-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000; /* below Moodle picker */
}
.path-local-edwiserstore .edwiser-product-editor-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50vw;
    max-width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.path-local-edwiserstore .edwiser-editor-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.path-local-edwiserstore .edwiser-editor-body {
    padding: 24px;
    overflow-y: auto;
}
.path-local-edwiserstore .edwiser-editor-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}
.path-local-edwiserstore .edwiser-editor-close {
    font-size: 22px;
    line-height: 1;
}

/* Notes/tips styling to match design cues */
.path-local-edwiserstore .edwiser-note {
    font-size: 12px;
    color: #6c757d;
}

/* Precise layout for Product Editor modal */
.path-local-edwiserstore .edwiser-product-editor-backdrop .edwiser-product-editor-panel {
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
}
.path-local-edwiserstore .edwiser-product-editor-panel .edwiser-editor-header {
    padding-top: 24px;
    padding-bottom: 16px;
}
.path-local-edwiserstore .edwiser-product-editor-panel .edwiser-editor-header h4 {
    font-weight: 600;
    font-size: 20px;
}

.path-local-edwiserstore .edwiser-product-editor-panel .edwiser-editor-body .form-control {
    height: auto;
}

.path-local-edwiserstore .edwiser-product-editor-panel .edwiser-editor-body .form-group {
    margin-bottom: 16px;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-note {
    font-size: 12px;
    line-height: 1.4;
}
.path-local-edwiserstore .edwiser-editor-body .form-row + .form-row {
    margin-top: 16px;
}

/* Related products chips (core/form-autocomplete) */
.path-local-edwiserstore .form-autocomplete-selection .form-autocomplete-selection-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.path-local-edwiserstore .form-autocomplete-selection
.form-autocomplete-selection-list
.form-autocomplete-selection-item,
.path-local-edwiserstore .form-autocomplete-selection .form-autocomplete-token {
    background: var(--edw-primary-lightest);
    color: var(--edw-primary);
    border-radius: 16px;
    padding: 4px 10px;
    border: 1px solid var(--edw-primary-pale);
}
.path-local-edwiserstore .form-autocomplete-selection .deleteaction {
    margin-left: 6px;
    color: var(--edw-primary);
}

/* Footer buttons sizing */
.path-local-edwiserstore .edwiser-editor-footer .btn {
    height: 44px;
    padding: 0 18px;
    font-weight: 600;
}
.path-local-edwiserstore .edwiser-editor-footer .btn-primary {
    background: var(--edw-primary);
    border-color: var(--edw-primary);
}
.path-local-edwiserstore .edwiser-editor-footer .btn-primary:hover {
    background: var(--edw-primary-hover);
    border-color: var(--edw-primary-hover);
}
.path-local-edwiserstore .edwiser-editor-footer .btn-link {
    color: #6c757d;
}
.path-local-edwiserstore .edwiser-editor-footer .btn-link:hover {
    color: #343a40;
}
.path-local-edwiserstore .edwiser-compact-select {
    width: 220px;
    min-width: 200px;
    max-width: 260px;
}
.path-local-edwiserstore .edwiser-editor-body .form-row {
    gap: 16px;
}
.path-local-edwiserstore .edwiser-editor-body label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.path-local-edwiserstore .edwiser-editor-body select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("../pix/select-arrow.svg");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    padding-left: 12px;
    height: 40px;
    line-height: 24px;
    width: 100%;
}
.path-local-edwiserstore .edwiser-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}
.path-local-edwiserstore .edwiser-inline-default {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
    margin-left: 12px;
    align-self: center;
}
.path-local-edwiserstore .edwiser-editor-body .form-row.align-items-start .edwiser-inline-default {
    align-self: flex-end;
}
/* Product type section: proper alignment */
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-group {
    margin-bottom: 16px;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-group label {
    margin-bottom: 6px;
    display: block;
}
.path-local-edwiserstore .edwiser-editor-body .form-row.edwiser-product-type-row {
    align-items: flex-start;
    margin-top: 0;
    gap: 12px;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-row .flex-fill {
    display: flex;
    flex-direction: column;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-row .flex-fill .edwiser-note {
    margin-top: 8px;
    margin-left: 0;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-help {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 120px;
    padding-top: 0;
    flex-shrink: 0;
}
.path-local-edwiserstore .edwiser-editor-body .edwiser-product-type-help .edwiser-inline-default {
    margin-left: 0;
    margin-bottom: 0;
    padding-top: 0;
    height: 40px;
    line-height: 40px;
    display: flex;
    align-items: center;
}

/* Toggle style for show/hide grid - proper toggle switches matching shop_settings */
.path-local-edwiserstore .edwiser-showhide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch input[type='checkbox'] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: background-color 0.2s;
    border-radius: 24px;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform 0.2s;
    border-radius: 50%;
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch input:checked + .toggle-slider {
    background-color: var(--edw-primary);
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--edw-primary) 30%, transparent);
}

.path-local-edwiserstore .edwiser-showhide-grid .toggle-label-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}
.path-local-edwiserstore .edwiser-editor-body textarea.form-control {
    height: auto;
    min-height: 240px;
}

/* Tiny/Atto editor height parity */
.path-local-edwiserstore .edwiser-product-editor-panel .tox-tinymce {
    min-height: 280px;
}
.path-local-edwiserstore .edwiser-product-editor-panel .tox .tox-edit-area__iframe {
    min-height: 220px;
}
.path-local-edwiserstore .edwiser-product-editor-panel .editor_atto {
    min-height: 280px;
}

/* Ensure TinyMCE dialogs (source code, link, etc.) appear above the product editor backdrop */
.path-local-edwiserstore .tox-tinymce-aux {
    z-index: 10001 !important;
}

/* When Moodle file picker is open, allow clicks to pass through our backdrop */
body.path-local-edwiserstore.edwiser-picker-open .edwiser-product-editor-backdrop {
    display: block; /* keep modal visible */
    pointer-events: none; /* but do not block clicks intended for the picker */
}
body.path-local-edwiserstore.edwiser-picker-open
.edwiser-product-editor-backdrop
.edwiser-product-editor-panel {
    pointer-events: auto; /* keep our editor panel interactive if needed */
}

/* Related product chips size */
.path-local-edwiserstore .form-autocomplete-selection
.form-autocomplete-selection-list
.form-autocomplete-selection-item,
.path-local-edwiserstore .form-autocomplete-selection .form-autocomplete-token {
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    font-weight: 500;
}

/* Autocomplete dropdown spacing */
.path-local-edwiserstore .form-autocomplete-suggestions .form-autocomplete-suggestions li,
.path-local-edwiserstore .form-autocomplete-suggestions .form-autocomplete-suggestion {
    padding: 8px 12px !important;
    font-size: 14px;
}

/* Footer spacing from content */
.path-local-edwiserstore .edwiser-product-editor-panel .edwiser-editor-footer {
    margin-top: 8px;
}
.path-local-edwiserstore .edwiser-editor-body .form-check {
    margin-right: 20px;
}
.path-local-edwiserstore .edwiser-editor-body .form-check-label {
    font-weight: 500;
}
.path-local-edwiserstore .edwiser-editor-footer {
    padding-top: 16px;
    padding-bottom: 16px;
}
.path-local-edwiserstore .edwiser-editor-footer .btn {
    min-width: 140px;
}
.path-local-edwiserstore .edwiser-product-editor-panel .btn.btn-primary {
    box-shadow: none;
}
.path-local-edwiserstore .edwiser-product-editor-panel .btn.btn-link {
    color: #6c757d;
}
.path-local-edwiserstore .edwiser-product-editor-panel .btn.btn-link:hover {
    color: #343a40;
    text-decoration: none;
}

/* Fine spacing for helper notes and icon tips */
.path-local-edwiserstore .edwiser-note.mt-1 {
    margin-top: 6px !important;
}
.path-local-edwiserstore .edwiser-product-editor-panel i.fa.fa-info-circle {
    color: #6c757d;
    font-size: 13px;
    margin-left: 4px;
}

/* Autocomplete width & spacing */
.path-local-edwiserstore .edwiser-product-editor-panel .form-autocomplete-downarrow {
    right: 10px;
}
.path-local-edwiserstore .edwiser-product-editor-panel .form-autocomplete-suggestions {
    max-height: 240px;
}

/* Hide paid and subscription sections by default - JavaScript will show them based on product type */
.path-local-edwiserstore .edwiser-product-editor-panel .section-paid,
.path-local-edwiserstore .edwiser-product-editor-panel .section-subscription {
    display: none;
}

/* Responsive adjustments for editor panel */
@media (max-width: 1024px) {
    .path-local-edwiserstore .edwiser-product-editor-panel {
        width: 92vw;
    }
}

@media (max-width: 576px) {
    .path-local-edwiserstore .edwiser-product-editor-panel {
        width: 100vw;
    }
    .path-local-edwiserstore .edwiser-editor-body .form-row {
        display: block !important;
    }
}

/* Delete Modal Overlay */
.local-edwiserstore-delete-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.local-edwiserstore-delete-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 90%;
    z-index: 10000;
}

.local-edwiserstore-delete-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.local-edwiserstore-delete-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.local-edwiserstore-delete-modal-body {
    padding: 20px 24px;
}

.local-edwiserstore-delete-modal-body p {
    margin: 0;
    color: #495057;
    font-size: 14px;
}

.local-edwiserstore-delete-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.local-edwiserstore-delete-modal-footer .btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.local-edwiserstore-delete-modal-footer .btn-secondary {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
}

.local-edwiserstore-delete-modal-footer .btn-secondary:hover {
    background: #f8f9fa;
}

.local-edwiserstore-delete-modal-footer .btn-primary {
    background: var(--edw-primary);
    border: 1px solid var(--edw-primary);
    color: #fff;
}

.local-edwiserstore-delete-modal-footer .btn-primary:hover {
    background: var(--edw-primary-hover);
    border-color: var(--edw-primary-hover);
}

/* Shop Settings Styles */
.local-edwiserstore-shop-settings {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.path-local-edwiserstore .shop-settings-form .form-group {
    margin-bottom: 24px;
}

.path-local-edwiserstore .shop-settings-form .form-group:last-child {
    margin-bottom: 0;
}

.path-local-edwiserstore .shop-settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.path-local-edwiserstore .shop-settings-form .form-control {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Override max-width for payment settings full-width fields */
.local-edwiserstore-payment-settings
.shop-settings-form
.form-control.payment-field-full-width {
    max-width: 100%;
}

.local-edwiserstore-payment-settings .shop-settings-form .form-control {
    max-width: 100%;
}

.path-local-edwiserstore .shop-settings-form .form-control:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--edw-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--edw-primary) 10%, transparent);
}

/* Toggle Switch Styles */
.path-local-edwiserstore .toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.path-local-edwiserstore .toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-bottom: 0 !important;
}

.path-local-edwiserstore .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.path-local-edwiserstore .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.2s;
    border-radius: 24px;
}

.path-local-edwiserstore .toggle-slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.path-local-edwiserstore .toggle-switch input:checked + .toggle-slider {
    background-color: var(--edw-primary);
}

.path-local-edwiserstore .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.path-local-edwiserstore .toggle-label-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    min-width: 40px;
}

/* Disabled Toggle State */
.path-local-edwiserstore .toggle-switch-wrapper.toggle-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.path-local-edwiserstore .toggle-switch-wrapper.toggle-disabled .toggle-switch {
    cursor: not-allowed;
}

.path-local-edwiserstore .toggle-switch-wrapper.toggle-disabled .toggle-slider {
    cursor: not-allowed;
    background-color: #e5e7eb;
}

.path-local-edwiserstore .toggle-switch-wrapper.toggle-disabled .toggle-label-text {
    color: #9ca3af;
    cursor: help;
}

.path-local-edwiserstore .toggle-switch input:disabled + .toggle-slider {
    background-color: #e5e7eb;
    cursor: not-allowed;
}

.path-local-edwiserstore .toggle-switch input:disabled + .toggle-slider:before {
    background-color: #d1d5db;
}

/* Toast Notification Styles */
.path-local-edwiserstore .shop-settings-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background-color: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.path-local-edwiserstore .shop-settings-toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.path-local-edwiserstore .shop-settings-toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.path-local-edwiserstore .shop-settings-toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 16px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.path-local-edwiserstore .shop-settings-toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Save Button */
.path-local-edwiserstore .shop-settings-form .btn-primary {
    background-color: var(--edw-primary);
    border-color: var(--edw-primary);
    color: white;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    min-width: 140px;
}

.path-local-edwiserstore .shop-settings-form .btn-primary:hover {
    background-color: var(--edw-primary-hover);
    border-color: var(--edw-primary-hover);
}

.path-local-edwiserstore .shop-settings-form .btn-primary:disabled {
    background-color: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
}

.path-local-edwiserstore .shop-settings-form .btn-secondary {
    background-color: #fff;
    border: 1px solid var(--edw-primary);
    color: var(--edw-primary);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    min-width: 140px;
}

.path-local-edwiserstore .shop-settings-form .btn-secondary:hover {
    background-color: var(--edw-primary);
    color: #fff;
}

/* Payment Settings Styles */
.local-edwiserstore-payment-settings {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.local-edwiserstore-payment-settings .shop-settings-form .form-group {
    margin-bottom: 24px;
}

.local-edwiserstore-payment-settings .shop-settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.local-edwiserstore-payment-settings .shop-settings-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.local-edwiserstore-payment-settings .shop-settings-form .form-control:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--edw-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--edw-primary) 10%, transparent);
}

/* Coupon Editor Modal Styles - Using Moodle ModalFactory */
.path-local-edwiserstore .modal-sidebar.modal-dialog {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    margin: 0 !important;
    max-width: 50vw !important;
    width: 50vw !important;
    transform: none !important;
}

.path-local-edwiserstore .modal-sidebar.modal-dialog:focus .modal-content {
    box-shadow: none !important;
}

.path-local-edwiserstore .modal-sidebar .modal-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.path-local-edwiserstore .modal-sidebar .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.path-local-edwiserstore .modal-sidebar .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.path-local-edwiserstore .modal-sidebar .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

/* Product editor styles in ModalFactory sidebar */
.path-local-edwiserstore .modal-sidebar .edwiser-editor-body {
    padding: 0; /* Remove padding since modal-body already has it */
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-footer {
    padding: 0; /* Remove padding since modal-footer already has it */
}

.path-local-edwiserstore .modal-sidebar .modal-header .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    flex-grow: 1;
}

.path-local-edwiserstore .modal-sidebar .order-download-icon-btn,
.path-local-edwiserstore .modal-sidebar .order-download-icon-btn:hover {
    color: var(--edw-primary);
    background: none;
    border: none;
    padding: 4px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 1;
}

.path-local-edwiserstore .modal-sidebar .modal-header .btn-close {
    order: 2;
    margin-left: 0;
}

.path-local-edwiserstore .modal-sidebar .order-download-icon-btn:hover,
.path-local-edwiserstore .modal-sidebar .order-download-icon-btn:focus {
    color: #1a5fc7;
}

.path-local-edwiserstore .modal-sidebar .order-download-icon-btn i {
    font-size: 18px;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body .form-group {
    margin-bottom: 16px;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body .form-control {
    height: auto;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body textarea.form-control {
    min-height: 100px;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body .tox-tinymce {
    min-height: 280px;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body .tox .tox-edit-area__iframe {
    min-height: 220px;
}

.path-local-edwiserstore .modal-sidebar .edwiser-editor-body .editor_atto {
    min-height: 280px;
}

.path-local-edwiserstore .modal-sidebar.edwiser-picker-open {
    pointer-events: none;
}

.path-local-edwiserstore .modal-sidebar.edwiser-picker-open .modal-content {
    pointer-events: auto;
}

/* Empty state styling */
.local-edwiserstore-empty-state {
    padding: 60px 20px;
}

.local-edwiserstore-empty-state .empty-illustration img {
    max-width: 200px;
    opacity: 0.6;
}

.local-edwiserstore-empty-state p {
    color: #6b7280;
    max-width: 400px;
    margin: 0 auto;
}

/* Badge styles */
.local-edwiserstore-content-card .badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 500;
}

/* Design fixes for toggle switches */
.path-local-edwiserstore .edwiser-showhide-grid .toggle-switch input:checked + .toggle-slider,
.path-local-edwiserstore .toggle-switch input:checked + .toggle-slider {
    background-color: #28a745;
}

/* Floating cart icon - pill button design */
.path-local-edwiserstore .edwiserstore-floating-cart {
    position: fixed;
    top: calc(var(--edwiserstore-navbar-offset, 56px) + 96px);
    right: 0;
    z-index: 1020;
    opacity: 1;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.path-local-edwiserstore .edwiserstore-floating-cart.is-empty {
    opacity: 0.4;
}

.path-local-edwiserstore .edwiserstore-floating-cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 14px;
    border-radius: 8px 0 0 8px;
    background: #343a40;
    color: #6b7280;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.path-local-edwiserstore .edwiserstore-floating-cart-link:hover,
.path-local-edwiserstore .edwiserstore-floating-cart-link:focus {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.path-local-edwiserstore .edwiserstore-floating-cart-link svg {
    color: #fff;
}

.path-local-edwiserstore .edwiserstore-floating-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    background: #6bf28a;
    color: #111;
    font-size: 13px;
    font-weight: 600;
}

.path-local-edwiserstore .edwiserstore-floating-cart-badge.is-hidden {
    display: none;
}

@media (max-width: 768px) {
    .path-local-edwiserstore .edwiserstore-floating-cart {
        right: 12px;
        top: calc(var(--edwiserstore-navbar-offset, 56px) + 12px);
    }

    .path-local-edwiserstore .edwiserstore-floating-cart-link {
        padding: 6px 8px 6px 12px;
        gap: 6px;
    }

    .path-local-edwiserstore .edwiserstore-floating-cart-link i.fa {
        font-size: 16px;
    }

    .path-local-edwiserstore .edwiserstore-floating-cart-badge {
        min-width: 22px;
        height: 22px;
        font-size: 12px;
        padding: 0 6px;
    }
}

/* ── Custom multi-select combobox (.edw-combo) ── */
.path-local-edwiserstore .edw-combo {
    position: relative;
    width: 100%;
}

.path-local-edwiserstore .edw-combo-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    padding: 4px 32px 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background: #fff;
    cursor: text;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.path-local-edwiserstore .edw-combo.open .edw-combo-control,
.path-local-edwiserstore .edw-combo-control:focus-within {
    border-color: var(--edw-primary, #0f6cbf);
    box-shadow: 0 0 0 0.2rem rgba(15, 108, 191, 0.12);
}

/* Chips container */
.path-local-edwiserstore .edw-combo-chips {
    display: contents;
}

/* Individual chip */
.path-local-edwiserstore .edw-combo-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 160px;
    background: var(--edw-primary-lightest, #e8f4fd);
    color: var(--edw-primary, #0f6cbf);
    border: 1px solid var(--edw-primary-pale, #b3d9f2);
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 11.5px;
    line-height: 1.5;
    white-space: nowrap;
}
.path-local-edwiserstore .edw-combo-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.path-local-edwiserstore .edw-combo-chip-remove {
    cursor: pointer;
    opacity: 0.65;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    flex-shrink: 0;
}
.path-local-edwiserstore .edw-combo-chip-remove:hover {
    opacity: 1;
}

/* Search input */
.path-local-edwiserstore .edw-combo-input {
    flex: 1 1 80px;
    min-width: 80px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 2px 0 !important;
    font-size: 13px;
    height: auto;
    line-height: 1.5;
}

/* Caret */
.path-local-edwiserstore .edw-combo-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    line-height: 0;
    pointer-events: none;
    transition: transform 0.2s;
}
.path-local-edwiserstore .edw-combo.open .edw-combo-caret {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown */
.path-local-edwiserstore .edw-combo-dropdown {
    display: none;
    position: absolute;
    z-index: 1060;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 4px 0;
}
.path-local-edwiserstore .edw-combo.open .edw-combo-dropdown {
    display: block;
}

.path-local-edwiserstore .edw-combo-dropdown li {
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}
.path-local-edwiserstore .edw-combo-dropdown li:hover,
.path-local-edwiserstore .edw-combo-dropdown li.highlighted {
    background: #f0f4f8;
}
.path-local-edwiserstore .edw-combo-dropdown li.selected {
    background: var(--edw-primary-lightest, #e8f4fd);
    font-weight: 500;
}
.path-local-edwiserstore .edw-combo-dropdown li.selected::after {
    content: '\2713';
    color: var(--edw-primary, #0f6cbf);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: auto;
}
.path-local-edwiserstore .edw-combo-dropdown li.hidden {
    display: none;
}
.path-local-edwiserstore .edw-combo-dropdown .edw-combo-empty {
    padding: 10px 12px;
    color: #999;
    font-size: 13px;
    font-style: italic;
    cursor: default;
}
.path-local-edwiserstore .edw-combo-dropdown .edw-combo-empty:hover {
    background: transparent;
}

/* ── Bundle courses sidebar list ── */
.path-local-edwiserstore .bundle-courses-heading {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.path-local-edwiserstore .bundle-courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.path-local-edwiserstore .bundle-courses-list li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.path-local-edwiserstore .bundle-courses-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 14px;
    width: 8px;
    height: 10px;
    background: currentColor;
    color: #6c757d;
    -webkit-mask:
        url("../pix/chevron-right.svg")
        no-repeat center/contain;
    mask:
        url("../pix/chevron-right.svg")
        no-repeat center/contain;
}
.path-local-edwiserstore .bundle-courses-list li a {
    color: var(--edw-primary, #0f6cbf);
    text-decoration: none;
}
.path-local-edwiserstore .bundle-courses-list li a:hover {
    text-decoration: underline;
}

/* Enrolled badge on bundle courses in product detail sidebar */
.path-local-edwiserstore .bundle-course-enrolled-badge {
    font-size: 0.75em;
    margin-left: 6px;
    vertical-align: middle;
    border-radius: 2px;
}

/* Bundle individual price display */
.path-local-edwiserstore .bundle-course-name {
    flex: 1;
    min-width: 0;
}
.path-local-edwiserstore .bundle-course-price {
    margin-left: 12px;
    font-weight: 600;
    white-space: nowrap;
    font-size: 13px;
    color: var(--edw-text-dark, #333);
}
.path-local-edwiserstore .bundle-course-free {
    color: var(--edw-primary, #0f6cbf);
}
.path-local-edwiserstore .bundle-price-summary {
    border-top: 1px solid #e2e8f0;
    padding: 12px 0 16px;
    margin-top: 8px;
}
.path-local-edwiserstore .bundle-individual-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 14px;
    color: #6c757d;
}
.path-local-edwiserstore .bundle-total-strikethrough {
    text-decoration: line-through;
}
.path-local-edwiserstore .bundle-savings {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
}
.path-local-edwiserstore .bundle-savings-amount {
    color: #28a745;
}

/* Bundle courses list in order details and subscriptions */
/* Bundle badge — used across cart, checkout, orders, subscriptions, product view */
.path-local-edwiserstore .edwiser-bundle-badge.badge {
    background-color: #671dcf !important;
    color: #fff !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
    padding: 4px 8px !important;
    height: 24px !important;
}

.path-local-edwiserstore .order-bundle-courses-list {
    list-style: disc;
    margin: 4px 0 0 18px;
    padding: 0;
    font-size: 0.9em;
    color: #555;
}
.path-local-edwiserstore .order-bundle-courses-list li {
    margin-bottom: 2px;
}

.path-local-edwiserstore .bundle-course-hidden {
    display: none;
}

.path-local-edwiserstore .bundle-courses-expanded .bundle-course-hidden {
    display: list-item;
}

.path-local-edwiserstore .bundle-courses-expanded ul.bundle-course-hidden {
    display: block;
}

.path-local-edwiserstore .bundle-courses-toggle-btn {
    background: none;
    border: none;
    color: var(--edw-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
}

.path-local-edwiserstore .bundle-courses-toggle-btn:hover {
    text-decoration: underline;
    color: var(--edw-primary-hover);
}

.path-local-edwiserstore .bundle-courses-toggle-btn-sm {
    font-size: 12px;
    padding: 2px 0;
    margin-top: 2px;
}

.path-local-edwiserstore .edwiser-bundle-course-row .form-group,
.path-local-edwiserstore .edwiser-single-course-row .form-group {
    flex: 1 !important;
}

.path-local-edwiserstore .bundle-review-course-selector {
    width: 100% !important;
    max-width: 550px !important;
}
/* stylelint-enable declaration-no-important */
