/* 04 View All (view-all-studio.js). The studio sits inside #carousel-studio; in 04 it uses display:contents
   so its panels and the Sponsored carousel panel share one column, ordered like the app's rows. */
/* Desktop View all uses the otherwise empty right sidebar column. Keep smaller layouts intact. */
@media(min-width:1101px){
 #editor-view[data-studio-section=viewall] .edit-pane{grid-column:2/-1}
 #editor-view[data-studio-section=viewall] .sidebar-column{grid-column:2/-1;grid-row:2;position:static;padding-top:0}
}
#view-all-studio[hidden],#carousel-studio>section[data-channel][hidden],#carousel-studio>details[hidden],#carousel-studio>.qs-jump[hidden]{display:none!important}
#carousel-studio[data-mode=viewall] #view-all-studio,#carousel-studio[data-mode=viewall] .va-groups{display:contents}
#carousel-studio[data-mode=viewall] .va-rows-panel{order:0}
#carousel-studio[data-mode=viewall]>section[data-channel=view-all-sponsored]{order:1}
#view-all-studio .panel{padding:18px}
#view-all-studio h2{margin:0 0 6px}
#view-all-studio p{margin:0 0 10px;line-height:1.5}
#view-all-studio .va-row-list{list-style:none;margin:6px 0 12px;padding:0;display:grid;gap:8px}
#view-all-studio .va-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--studio-line,#d8e3e5);border-radius:10px;background:var(--studio-soft,#f6f9fa)}
#view-all-studio .va-row small{color:var(--studio-muted,#617181);font-size:12px}
#view-all-studio .va-row-name{flex:1 1 220px;margin:0}
#view-all-studio .va-row-name input{width:100%;min-height:40px}
#view-all-studio .va-row button{min-height:40px;min-width:44px;margin:0}
#view-all-studio .va-row .danger-text{color:#b42318}
#view-all-studio .va-group h3{margin:0 0 6px;font-size:17px}
:is(#view-all-studio,.va-sponsor) .va-row-summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:9px 12px;margin:2px 0 12px;border-radius:10px;border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;font-size:13.5px;line-height:1.45}
:is(#view-all-studio,.va-sponsor) .va-row-summary-text{font-weight:600;color:#1e3a8a}
:is(#view-all-studio,.va-sponsor) .va-row-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:3px 9px;border-radius:999px;background:#e2e8f0;color:#475569;flex:none}
:is(#view-all-studio,.va-sponsor) .va-row-pill.is-live{background:#dcfce7;color:#15803d}
:is(#view-all-studio,.va-sponsor) .va-row-pill.is-live::before{content:'';width:7px;height:7px;border-radius:50%;background:#16a34a}
:is(#view-all-studio,.va-sponsor) .va-row-pill.is-warn{background:#fef3c7;color:#92400e}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card{border:1px solid var(--studio-line,#d8e3e5);border-radius:12px;margin-bottom:8px;overflow:hidden;background:var(--studio-panel,#fff)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-head{all:unset;box-sizing:border-box;display:grid;grid-template-columns:72px minmax(0,1fr) 24px;gap:12px;align-items:center;width:100%;padding:10px;cursor:pointer;min-height:44px}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-head:hover{background:var(--studio-soft,#f6f9fa)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-head:focus-visible{outline:2px solid var(--studio-accent,#1856e8);outline-offset:-2px}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-head[aria-expanded=true]{background:var(--studio-soft,#f6f9fa);border-bottom:1px solid var(--studio-line,#d8e3e5)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-chevron{font-size:16px;color:var(--studio-muted,#617181);text-align:center}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-image{width:72px;height:80px;border-radius:8px;overflow:hidden;background:var(--studio-soft,#f6f9fa);display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--studio-muted,#617181)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-image img{width:100%;height:100%;object-fit:cover}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-copy small{font-size:12px;color:var(--studio-muted,#617181)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-copy small.va-live-badge{color:#15803d}
#view-all-studio .va-offer-form{display:grid;gap:12px;padding:14px}
#view-all-studio .va-offer-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:16px;align-items:start}
#view-all-studio .va-offer-art{display:grid;gap:12px;min-width:0}
#view-all-studio .va-offer-form :is(.va-placement,.va-offer-details,.va-offer-options){display:grid;gap:12px;min-width:0;margin:0;padding:12px;border:1px solid var(--studio-line,#dbe0ed);border-radius:10px;background:var(--studio-panel,#fff)}
#view-all-studio .va-offer-form :is(.va-placement,.va-offer-details)>legend{font-size:14px;font-weight:700;padding:0 4px}
#view-all-studio .va-offer-options>h4{font-size:14px;margin:0}
@media(max-width:1100px){#view-all-studio .va-offer-layout{grid-template-columns:minmax(0,1fr)}}
#view-all-studio .va-offer-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;margin:0}
#view-all-studio .va-offer-form small{font-weight:400;color:var(--studio-muted,#617181);font-size:12px}
#view-all-studio .va-offer-form textarea,#view-all-studio .va-offer-form input:not([type=file]),#view-all-studio .va-offer-form select{min-height:40px;width:100%;box-sizing:border-box}
#view-all-studio .va-offer-form .grid.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#view-all-studio .va-offer-form .media-field{display:grid;gap:8px;padding:12px;border:1px dashed var(--studio-line,#d8e3e5);border-radius:10px}
/* Card image box: always shown, the offer card's 9:10 shape (Joey 12-03-2026) at the same width as the Sponsored card editor's
   box. Drop an image on it (drag-drop.js handles every .media-field) or use Choose image. */
#view-all-studio .va-offer-form .va-image-frame{position:relative;width:100%;max-width:360px;box-sizing:border-box;aspect-ratio:9/10;overflow:hidden;border:1px solid var(--studio-line,#d9deed);border-radius:11px;background:var(--studio-soft,#edf0fa);display:flex;align-items:center;justify-content:center}
/* The editor's general .media-thumb rule caps previews at 140px tall; lift it here so a 9:10 image fills
   the 9:10 box exactly (it was squeezed into a 140px strip and cropped top and bottom). */
#view-all-studio .va-offer-form .va-image-frame .media-thumb{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;border-radius:0}
#view-all-studio .va-offer-form .media-thumb[hidden]{display:none}
#view-all-studio .va-offer-form .va-image-placeholder{padding:10px;text-align:center;font-size:12px;color:var(--studio-muted,#617181)}
#view-all-studio .va-offer-form .va-image-frame:has(.media-thumb:not([hidden])) .va-image-placeholder{display:none}
#view-all-studio .va-offer-form .media-field input[type=file]{display:none}
#view-all-studio .va-offer-form .upload-label,#view-all-studio .va-offer-form .media-field button{justify-self:start}
/* Choose image, Choose from Images and Remove image sit side by side in one row at the same height (they
   were stacked with uneven widths); on a narrow screen the row wraps. Everything else in the box keeps
   its own full-width line. When they do not fit they wrap to the next line; on phones two per line. (Joey, 12-02-2026) */
#view-all-studio .va-offer-form .media-field{display:flex;flex-wrap:wrap;align-items:stretch}
#view-all-studio .va-offer-form .media-field>*{flex:0 0 100%;min-width:0}
/* The 9:10 box keeps its 360px width and still gets a line to itself, so the buttons start below it. */
#view-all-studio .va-offer-form .media-field>.va-image-frame{margin-right:max(0px,calc(100% - 360px))}
#view-all-studio .va-offer-form .media-field>:is(.upload-label,.choose-existing-media,.va-remove-image,.va-remove-detail){flex:0 0 auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:38px;margin:0;padding:8px 14px;line-height:1.2;white-space:nowrap}
#view-all-studio .va-offer-form .media-field>:is(.upload-label,.choose-existing-media,.va-remove-image,.va-remove-detail)[hidden]{display:none}
@media(max-width:520px){#view-all-studio .va-offer-form .media-field>:is(.upload-label,.choose-existing-media,.va-remove-image,.va-remove-detail){flex:1 1 calc(50% - 4px);white-space:normal}}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-status:empty{display:none}
/* Shared delete/trash image buttons act on 02 offer forms only; the card editor has its own Remove image. */
#view-all-studio .va-offer-form .delete-uploaded-file,#view-all-studio .va-offer-form .remove-media{display:none}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-status.error,#view-all-studio .va-status.error{color:#b42318}
#view-all-studio .contact-info-actions{display:flex;gap:10px;flex-wrap:wrap}
#view-all-studio .contact-info-actions button{margin:0}
#view-all-studio .contact-info-steps{font-size:13px;line-height:1.6;color:var(--studio-muted,#617181);margin-top:10px}
#view-all-studio .va-live{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:10px 13px;margin:4px 0 12px;border-radius:10px;border:1px solid #bbf7d0;background:#f0fdf4;color:#14532d;font-size:14px;line-height:1.45}
#view-all-studio .va-live-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#15803d;background:#dcfce7;padding:3px 8px;border-radius:999px}
#view-all-studio .va-live-label::before{content:'';width:7px;height:7px;border-radius:50%;background:#16a34a}
#view-all-studio .va-live-rows{font-weight:700;color:#14532d}
#view-all-studio .va-status:empty,#view-all-studio .va-live:empty{display:none}
@media(max-width:620px){:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-head{grid-template-columns:56px minmax(0,1fr) 20px}:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-image{width:56px;height:62px}#view-all-studio .va-offer-form .grid.two{grid-template-columns:1fr}}
/* Old search-carousel cards (they once filled a View all row; every row now holds offers): shown nowhere. */
#carousel-studio>section[data-channel=search-carousel]{display:none!important}
#view-all-studio .va-add-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
#view-all-studio .va-add-actions button{margin:0}
/* Drag to reorder (mouse, touch and pen). Only the grip has touch-action:none, so cards still scroll. */
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card-top{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:stretch}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-grip{all:unset;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:48px;min-height:48px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;color:var(--studio-muted,#617181);border-right:1px solid var(--studio-line,#d8e3e5);background:var(--studio-soft,#f6f9fa)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-grip:focus-visible{outline:2px solid var(--studio-accent,#1856e8);outline-offset:-2px}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-grip:disabled{cursor:default;opacity:.55}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-place{font-size:13px;font-weight:800;color:var(--studio-ink,#142138)}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-grip-dots{font-size:18px;line-height:1}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card.va-dragging{box-shadow:0 10px 24px #0f172a33;border-color:var(--studio-accent,#1856e8);position:relative;z-index:2}
:is(#view-all-studio,.va-sponsor,#offers-list) .va-card.va-dragging .va-grip{cursor:grabbing;background:var(--balanced-wash,#e8efff)}
body.va-drag-active{user-select:none;-webkit-user-select:none;cursor:grabbing}
/* "Open details page when tapped" checkbox (02 offers, 04 card editor, carousel cards). */
.opens-details-check small,#view-all-studio .va-offer-form .va-check small{display:block;width:100%;font-weight:400;font-size:12px;color:var(--studio-muted,#617181)}
#view-all-studio .va-offer-form .va-check{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
#view-all-studio .va-offer-form .va-check input{width:auto;min-height:0}
#editor-view .coupon-card .opens-details-check{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;font-weight:700;font-size:13px;margin:12px 0 4px}
#editor-view .coupon-card .opens-details-check input{width:auto;min-height:0;margin:0}
/* The 04 card editor has its own Remove image (it only clears the field), so the shared note about
   permanently deleting files does not apply there. */
#view-all-studio .va-offer-form .permanent-image-help{display:none}
/* 04 Sponsored carousel (16:9) (view-all-studio.js renderTopSponsor): the same card list as the rows. The card
   forms stay in the carousel panel's list; CSS order shows the open card's form right under it. */
#carousel-studio[data-mode=viewall]>section.va-sponsor{display:flex!important;flex-direction:column;gap:0;padding:18px}
#carousel-studio>section.va-sponsor>h2{order:0;margin:0 0 4px}
#carousel-studio>section.va-sponsor .qs-toggle{font-size:17px;padding:0;min-height:0;cursor:default;pointer-events:none}
#carousel-studio>section.va-sponsor .qs-toggle::before{content:none}
#carousel-studio>section.va-sponsor>p.muted:not(.va-sponsor-empty),#carousel-studio[data-mode=viewall]>section.va-sponsor>.qs-row-summary{display:none}
#carousel-studio>section.va-sponsor>.va-sponsor-empty{margin:0 0 10px}
#carousel-studio>section.va-sponsor>.qs-thumbnails,#carousel-studio>section.va-sponsor .qs-thumbnails,#carousel-studio>section.va-sponsor>.qs-empty{display:none!important}
#carousel-studio>section.va-sponsor>.carousel-add-card{order:1000;align-self:flex-start;margin-top:4px}
#carousel-studio>section.va-sponsor.va-sponsor-closed>.carousel-card-list{display:none!important}
#carousel-studio>section.va-sponsor>.carousel-card-list{margin:-9px 0 8px;border:1px solid var(--studio-line,#d8e3e5);border-top:0;border-radius:0 0 12px 12px;padding:12px;background:var(--studio-panel,#fff)}
#carousel-studio>section.va-sponsor>.va-card.va-card-open{border-bottom-left-radius:0;border-bottom-right-radius:0}
#carousel-studio>section.va-sponsor .va-grip-static{cursor:default}
#carousel-studio>section.va-sponsor>h2{text-align:left;align-self:stretch}
#carousel-studio>section.va-sponsor .qs-toggle{justify-content:flex-start;width:100%}
#carousel-studio>section.va-sponsor>.va-card{align-self:stretch;width:100%;max-width:none;box-sizing:border-box;margin:0 0 8px;grid-column:auto}
/* Same box as the other row panels (not the 03 panel's open highlight). */
#carousel-studio>section.va-sponsor.qs-open{border-color:var(--studio-line,#d8e3e5);background:var(--studio-panel,#fff)}
/* Card editor picture: 360px wide in every View all row (same as the offer card editors' .va-image-frame);
   9:10 for Sponsored cards, 16:9 for the top Sponsored carousel. */
#carousel-studio>section.va-sponsor .qs-image-frame{width:360px;max-width:100%;flex-basis:auto}
#carousel-studio>section[data-channel=view-all-sponsored].va-sponsor .va-card-head{grid-template-columns:88px minmax(0,1fr) 24px}
#carousel-studio>section[data-channel=view-all-sponsored].va-sponsor .va-card-image{width:88px;height:50px}
#carousel-studio>section.va-sponsor .qs-image-placeholder{font-size:12px;padding:8px;text-align:center}
/* View all offer card editor: Additional offer settings actions. */
#view-all-studio .va-offer-form .va-offer-actions{display:flex;gap:8px;flex-wrap:wrap}
#view-all-studio .va-offer-form .va-offer-actions button{margin:0;min-height:40px}
/* "+ Add offer" at the end of each 04 row. */
#view-all-studio .va-add-offer{display:grid;gap:8px;margin-top:4px}
#view-all-studio .va-add-offer>button{justify-self:start;margin:0;min-height:44px}
#view-all-studio .va-add-offer .va-add-business{display:grid;gap:6px;font-size:13px;font-weight:700}
#view-all-studio .va-add-offer select{min-height:40px;max-width:420px}
#view-all-studio .va-add-actions-row{display:flex;gap:8px;flex-wrap:wrap}
#view-all-studio .va-add-actions-row button{margin:0;min-height:44px}
#view-all-studio .va-add-offer small{color:var(--studio-muted,#617181);font-size:12px}
/* 02 Offers: list of every offer (offers-list.js), same card look as the 04 rows. */
#offers-list{padding:18px;display:grid;gap:12px}
#offers-list h2{margin:0}
#offers-list p{margin:0;line-height:1.5}
#offers-list .offers-list-tools{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
#offers-list .offers-list-search{display:grid;gap:6px;font-size:13px;font-weight:700;flex:1 1 260px}
#offers-list .offers-list-search input{min-height:40px;width:100%;box-sizing:border-box}
#offers-list .offers-list-archived{display:flex;gap:8px;align-items:center;min-height:44px}
#offers-list .offers-list-count{font-size:12px;color:var(--studio-muted,#617181)}
#offers-list .offers-list-items .va-card{margin-bottom:0}
#offers-list .offers-list-items{display:grid;gap:8px}
#offers-list .va-card-head:disabled{cursor:default;opacity:.85}
#offers-list .offers-list-archived-badge{color:#92400e}
#offers-list .offers-list-restore{margin:0 10px 10px;min-height:40px}
/* Explore: bottom carousel custom section title + live status banner (section-layout.js). */
#carousel-studio>section[data-channel=popular]>.explore-popular-title-box{grid-column:1/-1;display:grid;gap:10px;padding:12px 14px;border:1px solid var(--studio-line,#d8e3e5);border-radius:11px;background:var(--studio-soft,#f6f9fa);margin:0 0 4px}
.explore-title-live{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:9px 12px;border-radius:10px;border:1px solid #bbf7d0;background:#f0fdf4;color:#14532d;font-size:14px;line-height:1.45}
.explore-title-live:empty{display:none}
.explore-title-live .va-live-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#15803d;background:#dcfce7;padding:3px 8px;border-radius:999px}
.explore-title-live .va-live-label::before{content:'';width:7px;height:7px;border-radius:50%;background:#16a34a}
.explore-title-live .va-live-rows{font-weight:700;color:#14532d}
.explore-title-live .va-row-pill.is-warn{display:inline-flex;align-items:center;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:#fef3c7;color:#92400e}
.explore-popular-title{display:grid;gap:6px;font-size:13px;font-weight:700;margin:0}
.explore-popular-title input{min-height:40px;max-width:420px;width:100%;box-sizing:border-box}
.explore-popular-title small{font-weight:400;font-size:12px;color:var(--studio-muted,#617181)}
#carousel-studio[data-mode=viewall]>section[data-channel=popular]>.explore-popular-title-box{display:none}
/* View all: App display's category buttons and card order after the rows. */
#launch-studio.in-view-all{margin-top:18px}
