/* Design & Style admin page */

/* Layout */
.stolik-config-layout {
    display: flex;
    gap: 10px;
    width: 100% !important;
    max-width: none !important;
    margin: 20px 0 !important;
    padding: 0;
}

.stolik-config-main {
    flex: 2;
    flex-basis: 67%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.stolik-config-sidebar {
    flex: 1;
    flex-basis: 33.333%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Section containers */
.stolik-config-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    overflow: hidden;
}

.stolik-config-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* Section headers */
.section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px 16px 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.section-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.section-description {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

/* Section content */
.section-content {
    padding: 24px;
    overflow-x: hidden; /* defensive: prevent any child from forcing page-level scroll */
}

/* Style tabs */
.stolik-style-tabs { margin-top: 16px; }
.stolik-tabs-nav { display: flex; list-style: none; margin: 0; padding: 0; border-bottom: 2px solid #f1f5f9; gap: 8px; }
.stolik-tabs-nav li { background: #f8fafc; border: 1px solid #e2e8f0; border-bottom: none; border-radius: 8px 8px 0 0; padding: 12px 20px; cursor: pointer; font-weight: 500; color: #64748b; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.stolik-tabs-nav li:hover { background: #f1f5f9; color: #374151; }
.stolik-tabs-nav li.active { background: #fff; color: #1e293b; border-color: #6366f1; position: relative; z-index: 1; }
.stolik-tabs-nav li.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #fff; }
.stolik-tab-content { display: none; padding: 24px 0 16px 0; }
.stolik-tab-content.active { display: block; }
.stolik-tab-content .form-table { margin-top: 0; }
.stolik-tab-content .form-table th { padding-left: 0; font-weight: 500; color: #374151; }
.stolik-tab-content .form-table td { padding-left: 0; }

/* Show alpha slider only when picker is open */
.stolik-config-section .wp-color-result.button {
    overflow: hidden;
    background-clip: padding-box;
}
.stolik-config-section .wp-color-result-text {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 28px;
    box-sizing: border-box;
}
.stolik-config-section .wp-picker-input-wrap {
    display: none !important;
}
@media screen and (max-width: 782px) {
    .stolik-config-section .wp-color-result-text {
        line-height: 30px;
    }
}
.wp-picker-container .stolik-alpha-control { display: none; }
.wp-picker-container.wp-picker-active .stolik-alpha-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.wp-picker-container.wp-picker-active .stolik-alpha-label {
    font-size: 11px;
    color: #6b7280;
    min-width: 54px;
}
.wp-picker-container.wp-picker-active .stolik-alpha-control input[type="range"] { flex: 1; }
.wp-picker-container.wp-picker-active .stolik-alpha-value { min-width: 44px; text-align: right; font-size: 11px; color: #555; }
.wp-picker-container .wp-color-result.stolik-alpha-active {
    background-image: linear-gradient(45deg, rgba(0,0,0,0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.08) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

/* Normalize Select2 emoji fonts */
#stolik_style_locale_select + .select2 .select2-selection__rendered,
#stolik_style_locale_select + .select2 .select2-results__option,
#stolik-style-locale-select + .select2 .select2-selection__rendered,
#stolik-style-locale-select + .select2 .select2-results__option { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI", Arial, sans-serif; }

/* Locale dropdown normal weight (surrounding labels bold) */
.stolik-locale-style-switcher .select2-selection__rendered,
.stolik-locale-style-switcher .select2-results__option { font-weight: 400 !important; }

/* Design & Style layout helpers */
.stolik-currency-input { max-width:120px; }
.stolik-form-actions { margin-top:12px; }
.stolik-form-actions--compact { margin:14px 0 4px; }
.stolik-locale-cards-fieldset { margin-top:10px; border:1px solid #e2e8f0; padding:16px 18px; border-radius:8px; }
.stolik-locale-cards-legend { font-weight:600; padding:0 6px; }
.stolik-locale-cards-desc { margin:4px 0 14px; font-size:12px; color:#555; }
.stolik-locale-template-select { min-width:200px; }
.stolik-locale-cards-note { margin-top:10px; font-size:11px; color:#666; }
.stolik-locale-style-switcher { margin:20px 0 10px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.stolik-locale-style-label { font-weight:600; font-size:13px; display:flex; align-items:center; gap:6px; flex:0 1 auto; flex-wrap:wrap; }
.stolik-locale-style-select { min-width:240px; }
.stolik-locale-style-switcher .select2-container { width:auto !important; min-width:240px; max-width:360px; }
.stolik-locale-style-switcher select { max-width:360px; }
.stolik-style-preview-btn { margin-left:auto; }
.stolik-nav-desc { margin:0 0 12px; }
.stolik-nav-control-grid { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.stolik-nav-control-col { display:flex; flex-direction:column; gap:6px; }
.stolik-nav-family-row { display:flex; gap:8px; align-items:center; flex-wrap:nowrap; }
.stolik-nav-family-select { min-width:200px; flex-shrink:0; }
.stolik-nav-custom-input { width:240px; height:28px; padding:3px 8px; box-sizing:border-box; flex-shrink:0; }
.stolik-nav-size-row { display:flex; align-items:center; gap:4px; }
.stolik-nav-size-input { width:90px; }
.stolik-nav-style-row { display:flex; gap:10px; align-items:center; }
.stolik-nav-style-label { display:flex; align-items:center; gap:6px; }
.stolik-nav-decoration-select { min-width:140px; }
.stolik-nav-note { margin-top:8px; }

/* Font picker helpers (settings helper output) */
.stolik-font-picker-grid { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.stolik-font-picker-col { display:flex; flex-direction:column; gap:6px; }
.stolik-font-picker-row { display:flex; gap:8px; align-items:center; flex-wrap:nowrap; }
.stolik-font-picker-select { min-width:200px; flex-shrink:0; }
.stolik-font-picker-custom-input { width:240px; height:28px; padding:3px 8px; box-sizing:border-box; flex-shrink:0; }
.stolik-font-picker-size-row { display:flex; align-items:center; gap:4px; }
.stolik-font-picker-size-input { width:90px; }
.stolik-font-picker-color { width:90px; }
.stolik-font-picker-decoration { min-width:90px; }

.stolik-nav-size-input:disabled,
.stolik-font-picker-size-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f1;
}

/* Downgrade notice: keep dismiss button inside banner */
.notice.stolik-downgrade-global { position: relative; padding-right: 32px; }
.notice.stolik-downgrade-global .notice-dismiss { position: absolute; top: 8px; right: 8px; }

/* Right-align section actions */
.stolik-config-section .form-actions,
.stolik-config-section .style-actions { display:flex; justify-content:flex-end; gap:8px; }
.stolik-config-section .form-actions .submit,
.stolik-config-section .style-actions .submit { margin:0; }

/* Range helpers */
.style-range { margin: 4px 0; }
.range-value { font-size: 12px; color: #6b7280; font-weight: normal; }

/* Logo section uniform input widths */
.stolik-logo-section select,
.stolik-logo-section .range-wrapper,
.stolik-logo-section .style-range,
.stolik-logo-section input[type="range"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

.stolik-logo-section select,
.stolik-logo-section .range-wrapper {
    margin-bottom: 10px;
}

/* Menu logo drag & drop upload feedback */
.logo-upload-zone.uploading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.logo-upload-zone.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #6366f1;
    border-radius: 50%;
    border-top-color: transparent;
    animation: stolikSpin 1s linear infinite;
    z-index: 20;
}

@keyframes stolikSpin {
    to { transform: rotate(360deg); }
}

/* Template carousel: responsive scroll-snap */
.stolik-template-carousel {
    position: relative;
    display: flex !important;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 4px 16px 12px 16px;
    padding-bottom: 12px;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
}

.stolik-carousel-shell {
    position: relative;
}

.stolik-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.95);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

.stolik-carousel-nav .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    line-height: 17px;
}

.stolik-carousel-nav.is-prev {
    left: 8px;
}

.stolik-carousel-nav.is-next {
    right: 8px;
}

.stolik-carousel-shell.is-scrollable:hover .stolik-carousel-nav,
.stolik-carousel-shell.is-scrollable:focus-within .stolik-carousel-nav,
.stolik-carousel-shell.is-scrollable.is-dragging .stolik-carousel-nav {
    opacity: 1;
    pointer-events: auto;
}

.stolik-carousel-nav:hover,
.stolik-carousel-nav:focus-visible {
    transform: translateY(-50%) scale(1.03);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.22);
}

.stolik-carousel-nav.is-disabled {
    opacity: 0 !important;
    pointer-events: none !important;
}

.stolik-template-carousel.is-grabbable,
.stolik-locale-cards.is-grabbable {
    cursor: grab;
}

.stolik-template-carousel.is-dragging,
.stolik-locale-cards.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
}

.stolik-template-carousel::-webkit-scrollbar {
    height: 8px;
}

.stolik-template-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.stolik-template-carousel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.stolik-template-carousel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Gradient edges hint scrollability */
.stolik-template-carousel::before,
.stolik-template-carousel::after {
    content: '';
    position: sticky;
    top: 0;
    bottom: 0;
    width: 18px;
    pointer-events: none;
    z-index: 1;
}
.stolik-template-carousel::before { left: 0; background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0)); }
.stolik-template-carousel::after  { right: 0; background: linear-gradient(to left,  rgba(255,255,255,0.9), rgba(255,255,255,0)); }


.stolik-template-carousel .stolik-template-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: clamp(150px, 18vw, 220px);
    max-width: 100%;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    padding: 12px;
    text-align: center;
    cursor: pointer;
}
.stolik-template-carousel .stolik-template-item.is-active {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.15);
}
.stolik-template-carousel .stolik-template-item--default { background: #ffffff; color: #2c3e50; }
.stolik-template-carousel .stolik-template-item--dark { background: #0a0a0a; color: #ffffff; border-color: #1f2937; }
.stolik-template-carousel .stolik-template-item--modern { background: #7b8e79; color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.stolik-template-carousel .stolik-template-item--elegant { background: #60351f; color: #f5f5dc; border-color: rgba(212, 175, 55, 0.5); }
.stolik-template-carousel .stolik-template-item--minimal { background: #f7f4e8; color: #6b5b4c; border-color: #e0dbcf; }
.stolik-template-item--dark input[type="radio"],
.stolik-template-item--modern input[type="radio"],
.stolik-template-item--elegant input[type="radio"] {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}
.stolik-template-item-title { font-weight: bold; margin-bottom: 8px; }

/* Center radio + label */
.stolik-template-carousel .stolik-template-item label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Custom radio for consistent inner dot */
.stolik-template-carousel .stolik-template-item input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    display: grid;
    place-content: center;
    background: #fff;
    margin: 0;
    padding: 0;
    accent-color: #007cba;
}
.stolik-template-carousel .stolik-template-item input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #007cba;
    transform: scale(0);
    transition: transform 120ms ease-in-out;
}
.stolik-template-carousel .stolik-template-item input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Tweak spacing on narrow screens */
@media (max-width: 600px) {
    .stolik-template-carousel { gap: 12px; padding: 4px 12px 10px 12px; }
    .stolik-template-carousel .stolik-template-item { min-width: clamp(140px, 62vw, 220px); }
}

/* Wide viewports: larger cards */
@media (min-width: 1600px) {
    .stolik-template-carousel .stolik-template-item { min-width: clamp(180px, 16vw, 240px); }
}

/* Fieldsets: prevent horizontal overflow */
.section-content fieldset {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Prevent carousel from forcing page scroll */
.section-content fieldset.stolik-locale-cards-fieldset {
    overflow-x: hidden;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    min-width: 0;
    contain: inline-size;
}

/* Locale cards carousel */
.stolik-locale-cards-wrap {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    width: 100% !important;
    box-sizing: border-box;
    min-width: 0;
}
.stolik-locale-cards {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 16px 12px;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    scroll-padding-inline: 16px;
}

@media (min-width: 1024px) {
    .stolik-template-carousel,
    .stolik-locale-cards {
        padding-inline: 38px;
        scroll-padding-inline: 38px;
    }

    .stolik-template-carousel::-webkit-scrollbar,
    .stolik-locale-cards::-webkit-scrollbar {
        height: 12px;
    }

    .stolik-template-carousel::-webkit-scrollbar-thumb,
    .stolik-locale-cards::-webkit-scrollbar-thumb {
        background: #a8afb8;
        border-radius: 8px;
        border: 2px solid #f1f5f9;
    }
}

.stolik-locale-cards::-webkit-scrollbar {
    height: 8px;
}

.stolik-locale-cards::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.stolik-locale-cards::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.stolik-locale-cards::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.stolik-locale-cards .locale-card {
    flex: 0 0 auto;
    min-width: min(420px, 85%);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    scroll-snap-align: start;
}
.locale-card-header { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; }
.locale-card-body { padding: 12px 14px 14px; display:flex; flex-direction:column; gap:12px; }
.locale-card-field { display:flex; flex-direction:column; gap:6px; }
.locale-card-field .field-label { font-size:12px; color:#64748b; font-weight:600; }
.locale-card-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.locale-card-meta .meta-label { font-size:12px; color:#64748b; margin-right:6px; }
.locale-card-meta .stolik-effective-template { font-weight:600; }
/* Saved badge after template selection (Design & Style page) */
.locale-card-meta .stolik-inline-flash { display:inline-block; margin-left:8px; font-size:10px; padding:2px 6px; border-radius:10px; line-height:1.2; font-weight:600; letter-spacing:.3px; }
.locale-card-meta .stolik-inline-flash.success { background:#10b981; color:#fff; }
/* .locale-card-meta .stolik-inline-flash.neutral removed (unused) */



@media (max-width: 600px) {
    .stolik-locale-cards { gap: 12px; padding: 6px 12px 10px; scroll-padding-inline: 12px; }
    .stolik-locale-cards .locale-card { min-width: 100%; }
}

/* Freemium Section */
.freemium-section .section-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom-color: #bbf7d0;
}

.freemium-section .section-title {
    color: #166534;
}

.freemium-section .section-description {
    color: #166534;
}

/* PRO Promotion Sections */
.pro-promotion-section {
    position: relative;
    border: 2px solid #e2e8f0;
}

.pro-promotion-section .section-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom-color: #fbbf24;
}

.pro-promotion-section .section-title {
    color: #92400e;
}

.pro-promotion-section .section-description {
    color: #92400e;
}

/* PRO Overlay - Main Container */
.pro-overlay {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.pro-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4, #10b981, #f59e0b);
    border-radius: 12px 12px 0 0;
}

/* PRO Message Container */
.pro-message {
    max-width: 700px;
    margin: 0 auto;
}

.pro-icon {
    font-size: 52px;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.pro-message h3 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 28px 0;
    line-height: 1.2;
}

/* PRO Features Grid */
.pro-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 28px 0 36px 0;
    text-align: left;
}

.pro-feature {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.pro-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.pro-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3b82f6;
}

.pro-feature:hover::before {
    transform: translateX(0);
}

.pro-feature .feature-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.pro-feature strong {
    display: block;
    color: #1e293b;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.pro-feature p {
    color: #64748b;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* PRO Button */
.pro-message .button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

/* Language label helpers (used in cards header) */
.stolik-lang-inline { display:flex; align-items:center; gap:8px; font-weight:600; }
.stolik-flag { display:inline-flex; align-items:center; justify-content:center; width:28px; height:22px; line-height:1; border-radius:4px; overflow:hidden; }
.stolik-flag .stolik-flag-emoji { display:block; width:100%; height:100%; font-size:18px; }
.stolik-flag .stolik-flag-emoji.fi { width:100%; height:100%; }
.stolik-flag .stolik-flag-emoji--globe { display:flex; align-items:center; justify-content:center; font-size:16px; }
.stolik-lang-label { font-weight:600; font-size:13px; color:#1e293b; }
/* Reset button intentionally omitted (legacy removal) */

/* Per-locale style panel (dynamic) */
.stolik-locale-styles-wrapper { margin-top:24px; border:1px solid #e2e8f0; border-radius:10px; }
.stolik-locale-styles-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.stolik-locale-styles-header h3 { margin:0; font-size:15px; font-weight:600; display:flex; gap:8px; align-items:center; }
.stolik-locale-styles-body { padding:18px 18px 22px; display:none; }
.stolik-locale-styles-wrapper.active .stolik-locale-styles-body { display:block; }
.stolik-locale-style-diff { position:relative; }
.stolik-locale-style-diff.diff-field-highlight { box-shadow:0 0 0 2px #f59e0b33; border-radius:6px; }
.stolik-locale-style-diff .diff-indicator { position:absolute; top:-8px; right:-8px; background:#f59e0b; color:#fff; font-size:10px; font-weight:600; padding:2px 5px; border-radius:10px; box-shadow:0 2px 4px rgba(0,0,0,0.1); }
.stolik-locale-style-actions { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0 4px; }
.stolik-locale-style-actions .button.secondary { background:#e2e8f0; color:#334155; border-color:#cbd5e1; }
.stolik-locale-style-actions .button.danger { background:#dc2626; border-color:#b91c1c; color:#fff; }
.stolik-locale-style-actions .button.link-btn { background:transparent; border:none; color:#2563eb; box-shadow:none; }
.stolik-locale-style-actions .button.link-btn:hover { text-decoration:underline; }

/* Toggle caret */
.stolik-locale-styles-header .toggle-caret { cursor:pointer; font-size:18px; line-height:1; transition:transform .2s ease; }
.stolik-locale-styles-wrapper.active .toggle-caret { transform:rotate(90deg); }

/* Animated highlight after save */
.stolik-style-save-pulse { animation:stolikPulse 1.4s ease; }
@keyframes stolikPulse { 0%{ box-shadow:0 0 0 0 rgba(34,197,94,0.7);} 70%{ box-shadow:0 0 0 8px rgba(34,197,94,0);} 100%{ box-shadow:0 0 0 0 rgba(34,197,94,0);} }

.pro-message .button-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pro-message .button-primary:hover::before {
    left: 100%;
}

.pro-message .button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

/* Form Styles for Freemium Section */
.freemium-section .form-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.freemium-section .form-table th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    font-weight: 600;
    color: #374151;
}

.freemium-section .form-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.freemium-section .form-table tr:last-child td {
    border-bottom: none;
}

/* Form Actions */
.form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-actions .button-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.form-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Responsive Design */
/* Responsive Layout */
@media (min-width: 901px) {
    .stolik-config-layout {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        max-width: none !important;
        margin: 20px 0 !important;
    }

    .stolik-config-main {
        flex: 2 !important;
        flex-basis: 66.666% !important;
        width: 66.666% !important;
    }

    .stolik-config-sidebar {
        flex: 1 !important;
        flex-basis: 33.333% !important;
        width: 33.333% !important;
    }
}

/* Switch to single-column layout earlier: at 1280px and below */
@media (max-width: 1280px) {
    .stolik-config-layout {
        flex-direction: column !important;
    }
    .stolik-config-main,
    .stolik-config-sidebar {
        flex: 1 1 100% !important;
        width: 100% !important;
        flex-basis: 100% !important;
    }
}

@media (max-width: 1024px) {
    .stolik-config-layout {
        padding: 0;
    }
}

@media (max-width: 900px) {
    .stolik-config-layout {
        flex-direction: column;
    }

    .stolik-config-main,
    .stolik-config-sidebar {
        flex: 1;
    }

    .section-header {
        padding: 16px 20px 12px 20px;
    }

    .section-content {
        padding: 20px;
    }

    .pro-overlay {
        padding: 32px 20px;
    }

    .pro-features-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pro-message h3 {
        font-size: 24px;
    }

    .pro-icon {
        font-size: 44px;
    }

    .pro-feature {
        padding: 20px;
    }

    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .stolik-config-main {
        gap: 20px;
    }

    .pro-overlay {
        padding: 24px 16px;
    }

    .pro-message .button-primary {
        padding: 14px 32px;
        font-size: 16px;
    }

    .section-header {
        padding: 14px 16px 10px 16px;
    }

    .section-content {
        padding: 16px;
    }
}

/* Style Actions Buttons */
.style-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.style-actions .stolik-reset-style {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.style-actions .stolik-reset-style:hover {
    background: #c82333;
    border-color: #bd2130;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.style-actions .stolik-set-template-default {
    background: #28a745;
    border: 1px solid #28a745;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.style-actions .stolik-set-template-default:hover {
    background: #218838;
    border-color: #1e7e34;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Form Actions (dla sekcji z formularzami) */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-actions .stolik-set-template-default {
    background: #28a745;
    border: 1px solid #28a745;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-actions .stolik-set-template-default:hover {
    background: #218838;
    border-color: #1e7e34;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.style-actions .button-primary {
    /* Match Save Colors & Fonts button style */
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.style-actions .button-primary:hover {
    /* Match hover of Save Colors & Fonts */
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Style Actions Responsive */
@media (max-width: 782px) {
    .style-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .style-actions .stolik-reset-style,
    .style-actions .button-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Logo Style Controls */
.logo-style-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.style-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.stolik-logo-section .style-label {
    width: 100%;
}

.style-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.stolik-logo-section .style-select,
.stolik-logo-section select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: block;
}

.style-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.style-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.style-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.style-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.range-value {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/* Logo Upload Area in Sidebar */
.stolik-config-sidebar .logo-upload-area {
    margin-bottom: 20px;
}

.stolik-config-sidebar .logo-upload-zone {
    min-height: 180px;
    max-height: 350px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.2s ease;
    padding: 25px 15px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Additional logo state helpers (migrated from admin.css, scoped to sidebar) */
.stolik-config-sidebar .logo-upload-zone.dragover { border-color: #6366f1; background: #eef2ff; }
.stolik-config-sidebar .logo-upload-zone.has-logo { border-style: solid; border-color: #94a3b8; }
.stolik-config-sidebar .logo-upload-zone.has-logo .logo-instructions,
.stolik-config-sidebar .logo-upload-zone.has-logo #menu_logo_best_results,
.stolik-config-sidebar .logo-upload-zone.has-logo .logo-select-btn { display: none !important; }
.stolik-config-sidebar .logo-upload-zone.invalid { border-color: #ef4444; background: #fee2e2; animation: stolik-shake 160ms linear 2; }
@keyframes stolik-shake { 0% { transform: translateX(0);} 25% { transform: translateX(-2px);} 50% { transform: translateX(2px);} 75% { transform: translateX(-2px);} 100% { transform: translateX(0);} }

/* Logo helper text/buttons (scoped) */
.stolik-config-sidebar .logo-instructions { color: #374151; font-weight: 500; margin: 10px; }
.stolik-config-sidebar .logo-best-results { color: #64748b; font-size: 13px; margin-bottom: 10px; }
.stolik-config-sidebar .logo-select-btn { background: #6366f1; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.stolik-config-sidebar .logo-remove-btn { background: #ef4444; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; }

/* Mobile tweaks for sections */
@media (max-width: 768px) {
    .section-header { padding: 16px 16px 12px 16px; }
    .section-content { padding: 16px; }
    .stolik-tabs-nav { flex-wrap: wrap; gap: 4px; }
    .stolik-tabs-nav li { padding: 8px 12px; font-size: 14px; }
}

.stolik-config-sidebar .logo-upload-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.stolik-config-sidebar .logo-preview {
    max-width: calc(100% - 30px);
    max-height: 280px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    object-fit: contain;
}

.stolik-inline-flash { display:inline-block; margin-left:6px; font-size:10px; padding:2px 6px; border-radius:10px; line-height:1.2; font-weight:600; letter-spacing:.3px; }
.stolik-inline-flash.success { background:#10b981; color:#fff; }
/* .stolik-inline-flash.neutral removed (unused) */

/* Hide third-party notices, allowlist Stolik notices */
.stolik-wrap .notice:not(.stolik-notice):not(.stolik-rating-notice):not([class*="stolik-"]) {
    display: none !important;
}
#stolik-notices .notice,
.stolik-wrap .notice.stolik-notice,
.stolik-wrap .notice.stolik-rating-notice,
.stolik-wrap .notice[class*="stolik-"],
.stolik-wrap .notice.stolik-translation-restrictions {
    display: block !important;
}
.stolik-rating-notice .stolik-rating-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stolik-rating-notice .stolik-rating-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}
.stolik-rating-notice .dashicons {
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    vertical-align: baseline !important;
}

/* Logo Drop Content - for positioning */
.stolik-config-sidebar .logo-drop-content {
    width: 100%;
    text-align: center;
    position: relative;
}

/* Logo positioning preview */
.stolik-config-sidebar .logo-drop-content[data-position="left"] {
    text-align: left !important;
}

.stolik-config-sidebar .logo-drop-content[data-position="left"] .logo-preview {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.stolik-config-sidebar .logo-drop-content[data-position="right"] {
    text-align: right !important;
}

.stolik-config-sidebar .logo-drop-content[data-position="right"] .logo-preview {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.stolik-config-sidebar .logo-drop-content[data-position="center"] {
    text-align: center !important;
}

.stolik-config-sidebar .logo-drop-content[data-position="center"] .logo-preview {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Logo Remove Button in Sidebar */
.stolik-config-sidebar .logo-remove-btn {
    margin-top: 10px;
    margin-bottom: 5px;
}

/* Ensure logo drop content has enough space */
.stolik-config-sidebar .logo-drop-content {
    width: 100%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}
