/* ============================================================
   TableTap — Direct-Touch Live Customizer Stylesheet
   Inherits menu.css and adds interactive inline editing controls.
   ============================================================ */

@import url('menu.css');

/* ============================================================
   1. Floating Studio Top Bar
   ============================================================ */
.studio-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.studio-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-studio-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background 0.18s ease;
}

.btn-studio-back:hover {
    background: #e5e7eb;
}

.studio-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #065f46;
    background: #ecfdf5;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

.studio-pill-badge span.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.studio-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-text-mobile {
    display: none;
}

.tool-text-desktop {
    display: inline;
}

.btn-studio-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.btn-studio-tool:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-studio-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #27ae60;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.28);
    transition: background 0.18s ease, transform 0.18s ease;
}

.btn-studio-save:hover {
    background: #219653;
    transform: translateY(-1px);
}

.btn-studio-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   2. Canvas Wrapper
   ============================================================ */
.studio-canvas {
    padding-top: 80px;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 30px));
    min-height: 100vh;
}

/* ============================================================
   3. Inline Editable Elements
   ============================================================ */
[contenteditable="true"] {
    outline: none;
    border-radius: 6px;
    padding: 2px 6px;
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: text;
}

[contenteditable="true"]:hover {
    background: rgba(128, 128, 128, 0.12);
}

[contenteditable="true"]:focus {
    background: rgba(128, 128, 128, 0.18);
    color: inherit;
    box-shadow: 0 0 0 1.5px var(--primary-color);
}

/* Product Description Editable & Placeholder */
.product-card .product-desc {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    min-height: 1.4em;
    word-break: break-word;
    margin: 4px 0 6px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-muted);
    border-radius: 6px;
    padding: 3px 6px;
    border: 1px dashed transparent;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.product-card .product-desc:hover {
    border-color: var(--text-muted);
}

.product-card .product-desc[data-empty="true"]::before,
.product-card .product-desc:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    opacity: 0.85;
    font-style: italic;
    pointer-events: none;
    display: inline-block;
}

/* Photo Upload Wrapper */
.image-upload-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
}

.category-image-trigger {
    width: 100%;
}

.image-upload-wrapper:hover .image-upload-overlay {
    opacity: 1;
}

.image-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
    gap: 6px;
    border-radius: inherit;
}

/* ============================================================
   4. Category & Product Card Action Buttons (Delete, Badge, etc.)
   ============================================================ */
/* Guide Banner for Beginners */
.customizer-guide-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--card-radius, 12px);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.customizer-guide-banner .guide-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.customizer-guide-banner strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 2px;
}

.category-card-customizer {
    position: relative;
    display: flex;
    flex-direction: column;
}

.category-card-customizer .category-details {
    flex: 1;
}

.category-card-customizer .category-card-footer {
    margin-top: auto;
}

.category-card-customizer .btn-enter-category {
    width: 100%;
    background: rgba(128, 128, 128, 0.06);
    color: var(--primary-color);
    border: none;
    border-top: 1px solid var(--border-color);
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.category-card-customizer:hover .btn-enter-category,
.category-card-customizer:active .btn-enter-category {
    background: var(--primary-color);
    color: #ffffff;
}

.category-card-customizer .btn-enter-category .arrow {
    font-size: 0.95rem;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.category-card-customizer:hover .btn-enter-category .arrow,
.category-card-customizer:active .btn-enter-category .arrow {
    transform: translateX(3px);
}

/* Empty Category Box */
.empty-category-box {
    text-align: center;
    padding: 36px 20px;
    background: var(--card-bg, #ffffff);
    border: 2px dashed var(--border-color);
    border-radius: var(--card-radius, 14px);
    margin: 12px 0;
}

.empty-category-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.empty-category-title {
    margin: 0 0 6px;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-color);
}

.empty-category-subtitle {
    margin: 0 0 16px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.category-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.btn-card-del {
    background: #ef4444;
    border: 2px solid #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn-card-del:hover,
.btn-card-del:active {
    background: #dc2626;
    transform: scale(1.08);
}

/* Add Category Box Button - Full Width and sleek */
.btn-add-category-box {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px dashed var(--border-color);
    border-radius: var(--card-radius, 14px);
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-height: 54px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    margin-top: 6px;
}

.btn-add-category-box svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.btn-add-category-box:hover,
.btn-add-category-box:active {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Add Product Card Button */
.btn-add-product-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px dashed var(--border-color);
    border-radius: var(--card-radius, 14px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin-top: 14px;
    min-height: 54px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.btn-add-product-box svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.btn-add-product-box:hover,
.btn-add-product-box:active {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Product Card Layouts & Adaptations for Customizer
   ============================================================ */
.product-card .image-upload-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: block;
    background-color: rgba(0, 0, 0, 0.04);
}

.product-card .image-upload-wrapper .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 6px;
    background: rgba(0, 0, 0, 0.04);
}

/* 1. Classic Style */
.card-style-classic .product-card .image-upload-wrapper {
    width: 100%;
    height: 160px;
    flex-shrink: 0;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* 2. Bold / Compact Style */
.card-style-bold .product-card {
    align-items: flex-start;
}
.card-style-bold .product-card .image-upload-wrapper {
    width: 85px;
    height: 85px;
    min-width: 85px;
    max-width: 85px;
    flex-shrink: 0;
    border-radius: 10px;
}
.card-style-bold .product-card .product-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 3. Minimal Style */
.card-style-minimal .product-card {
    align-items: flex-start;
}
.card-style-minimal .product-card .image-upload-wrapper {
    width: 65px;
    height: 65px;
    min-width: 65px;
    max-width: 65px;
    flex-shrink: 0;
    border-radius: 8px;
}
.card-style-minimal .product-card .product-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 4. Elegant Style */
.card-style-elegant .product-card {
    min-height: 200px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.card-style-elegant .product-card .image-upload-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: var(--card-radius);
}
.card-style-elegant .product-card .product-body {
    position: relative;
    z-index: 2;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    padding: 14px 16px;
    color: #ffffff;
}
.card-style-elegant .product-card .product-actions-bar {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: #f3f4f6;
}

/* Product Card Action Bar */
.product-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Badges in Customizer */
.btn-badge-toggle {
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-badge-toggle:active {
    transform: scale(0.95);
}

.btn-badge-toggle.badge-none {
    background: rgba(128, 128, 128, 0.08);
    color: var(--text-muted);
    border: 1px dashed var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 6px;
}

.btn-badge-toggle.badge-none:hover {
    background: rgba(128, 128, 128, 0.16);
}

.availability-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-color);
}

.availability-label input[type="checkbox"] {
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* ============================================================
   5. Modals & Bottom Sheets (Style & Wi-Fi)
   ============================================================ */
.studio-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.studio-modal-overlay.active {
    display: flex;
}

.studio-modal {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111111;
}

.btn-close-modal {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #4b5563;
}

.form-group-modal {
    margin-bottom: 20px;
}

.form-group-modal label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* Enhanced Color Picker Card (Intuitive Clickable Target for Non-Technical Users) */
.color-picker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 9px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: relative;
    user-select: none;
}

.color-picker-card:hover {
    border-color: #27ae60;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.12);
    transform: translateY(-1px);
}

.color-picker-card:active {
    transform: scale(0.99);
}

.color-picker-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-swatch-bubble {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.14);
    display: block;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.color-picker-card:hover .color-swatch-bubble {
    transform: scale(1.08);
}

.color-picker-action-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.btn-change-color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    pointer-events: none;
    transition: all 0.18s ease;
}

.color-picker-card:hover .btn-change-color {
    background: #27ae60;
    border-color: #27ae60;
    color: #ffffff;
}

.color-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Quick 1-Click Preset Colors */
.color-quick-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-left: 2px;
}

.presets-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 2px;
}

.preset-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.preset-color-dot:hover {
    transform: scale(1.22);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.preset-color-dot:active {
    transform: scale(0.95);
}

/* Background Mode Switch (Color vs Image) */
.switch-pills {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.switch-pill {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    border: none;
    background: transparent;
}

.switch-pill.active {
    background: #ffffff;
    color: #111111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Card Style Grid Select */
.card-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.card-style-option {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.18s ease;
}

.card-style-option:hover {
    border-color: #9ca3af;
}

.card-style-option.active {
    border-color: var(--primary-color);
    background: rgba(39, 174, 96, 0.08);
    color: var(--primary-color);
}

/* Select Dropdown */
.select-input-modal {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #1f2937;
}

.text-input-modal {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 12px;
}

/* ============================================================
   6. Toast Notifications
   ============================================================ */
.studio-toast {
    position: fixed;
    bottom: calc(85px + env(safe-area-inset-bottom, 24px));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #ffffff;
    padding: 11px 22px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0.22s;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90vw;
    text-align: center;
}

.studio-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.studio-toast.success {
    background: #065f46;
}

.studio-toast.error {
    background: #991b1b;
}

/* ============================================================
   7. Mobile Layout
   ============================================================ */
@media (max-width: 640px) {
    .studio-topbar {
        padding: 0 8px;
        height: 52px;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .studio-topbar::-webkit-scrollbar {
        display: none;
    }

    .studio-canvas {
        padding-top: 64px;
        padding-bottom: calc(110px + env(safe-area-inset-bottom, 30px));
    }

    .studio-pill-badge {
        display: none !important;
    }

    .studio-bar-left {
        flex-shrink: 0;
    }

    .btn-studio-back {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
    }

    .btn-studio-back span {
        display: none !important;
    }

    .studio-bar-right {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .tool-text-desktop {
        display: none !important;
    }

    .tool-text-mobile {
        display: inline !important;
    }

    .btn-studio-tool {
        height: 34px;
        padding: 0 7px;
        font-size: 0.76rem;
        gap: 3px;
        border-radius: 9px;
        white-space: nowrap !important;
        flex-shrink: 0;
        border-color: #e5e7eb;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-studio-tool .tool-icon {
        font-size: 0.88rem;
        line-height: 1;
    }

    /* Icon-only compact square buttons on mobile for Wi-Fi and Reset */
    #btnOpenWifi,
    #btnResetMenu {
        width: 34px;
        min-width: 34px;
        padding: 0;
        justify-content: center;
    }

    #btnOpenWifi .tool-icon,
    #btnResetMenu .tool-icon {
        font-size: 0.95rem;
        margin: 0;
    }

    .btn-presets-glow {
        background: #fdf2f8;
        border: 1px solid #fbcfe8;
        color: #be185d;
        font-weight: 700;
        box-shadow: 0 1px 3px rgba(244, 114, 182, 0.15);
    }

    .btn-presets-glow:hover,
    .btn-presets-glow:active {
        background: #fce7f3;
        color: #9d174d;
        border-color: #f472b6;
        transform: none;
    }

    .btn-studio-save {
        height: 34px;
        padding: 0 9px;
        font-size: 0.78rem;
        font-weight: 700;
        gap: 4px;
        border-radius: 9px;
        white-space: nowrap !important;
        flex-shrink: 0;
        background: #27ae60;
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(39, 174, 96, 0.28);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-studio-save .tool-icon {
        font-size: 0.88rem;
        line-height: 1;
    }

    /* Modal adjustments on mobile */
    .studio-modal {
        border-radius: 20px 20px 0 0;
        padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 20px));
        max-height: 88vh;
    }

    .presets-theme-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .studio-topbar {
        padding: 0 4px;
        gap: 3px;
    }

    .studio-bar-right {
        gap: 3px;
    }

    .btn-studio-back,
    #btnOpenWifi,
    #btnResetMenu {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    #btnOpenStyle .tool-text-mobile {
        display: none !important;
    }

    #btnOpenStyle {
        width: 32px;
        min-width: 32px;
        padding: 0;
        justify-content: center;
    }

    .btn-studio-tool,
    .btn-studio-save {
        height: 32px;
    }

    .btn-studio-save {
        padding: 0 7px;
        font-size: 0.74rem;
    }
}

/* ============================================================
   14. Cute Menu Themes & Recommendations Modal
   ============================================================ */
.btn-presets-glow {
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 50%, #f5f3ff 100%);
    border: 1px solid #fbcfe8;
    color: #be185d;
    box-shadow: 0 1px 4px rgba(244, 114, 182, 0.15);
}

.btn-presets-glow:hover {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9d174d;
    border-color: #f472b6;
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.25);
    transform: translateY(-1px);
}

/* Callout inside style modal */
.style-presets-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 100%);
    border: 1px solid #fbcfe8;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(244, 114, 182, 0.08);
}

.callout-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.callout-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.callout-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #9d174d;
}

.callout-desc {
    font-size: 0.8rem;
    color: #4b5563;
    margin-top: 2px;
}

.btn-callout-action {
    background: #db2777;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.btn-callout-action:hover {
    background: #be185d;
}

/* Modal Wide */
.studio-modal-wide {
    max-width: 680px;
    width: 100%;
}

.modal-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: normal;
    line-height: 1.4;
}

/* Themes Grid */
.presets-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.preset-theme-card {
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
}

.preset-theme-card:hover {
    transform: translateY(-3px);
    border-color: #ec4899;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
}

.preset-theme-card.active {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.22);
}

/* Mini visual preview of the menu */
.preset-theme-preview {
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: background 0.2s ease;
}

.preset-mini-card {
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.preset-mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
}

.preset-mini-pill {
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.68rem;
}

.preset-mini-price {
    font-weight: 800;
}

.preset-mini-title {
    font-size: 0.88rem;
    font-weight: 700;
}

/* 4 Palette dots */
.preset-palette-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.preset-palette-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    display: inline-block;
}

/* Info Section */
.preset-theme-info {
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.preset-theme-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.preset-theme-desc {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

.preset-theme-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.preset-tag {
    font-size: 0.72rem;
    background: #f3f4f6;
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* Apply button inside card */
.btn-apply-preset {
    margin: 4px 16px 14px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

.preset-theme-card:hover .btn-apply-preset {
    background: #be185d;
    color: #ffffff;
    border-color: #be185d;
    box-shadow: 0 4px 12px rgba(190, 24, 93, 0.25);
}

.preset-theme-card.active .btn-apply-preset {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

/* ============================================================
   15. Reset Menu & Styles Modal Styling
   ============================================================ */
.reset-options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reset-option-card {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.18s ease;
}

.reset-option-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.reset-option-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.reset-option-icon {
    font-size: 1.5rem;
    line-height: 1;
    padding: 8px;
    background: #f3f4f6;
    border-radius: 10px;
    flex-shrink: 0;
}

.reset-option-info {
    flex: 1;
}

.reset-option-title {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
}

.reset-option-desc {
    margin: 0;
    font-size: 0.83rem;
    color: #6b7280;
    line-height: 1.45;
}

.reset-option-desc code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #374151;
}

.reset-option-safe-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #065f46;
    background: #ecfdf5;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
}

.reset-option-danger-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #991b1b;
    background: #fee2e2;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

.reset-card-danger {
    border-color: #fecaca;
    background: #fffafa;
}

.reset-card-danger:hover {
    border-color: #f87171;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.1);
}

.btn-reset-action {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    text-align: center;
}

.btn-reset-style {
    background: #10b981;
    color: #ffffff;
}

.btn-reset-style:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-reset-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-reset-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
