.logo-style-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}
.logo-style-carousel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}
.carousel-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
    text-align: left;
}
.carousel-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    align-items: center;
}
.carousel-btn {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn.selected, .carousel-btn.active, .carousel-btn:focus {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.10);
}
.shape-icon, .bg-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
}
.shape-circle {
    border-radius: 50%;
    background: #d1d5db;
    width: 24px; height: 24px;
}
.shape-rounded {
    border-radius: 8px;
    background: #d1d5db;
    width: 24px; height: 24px;
}
.shape-square {
    border-radius: 4px;
    background: #d1d5db;
    width: 24px; height: 24px;
}
.bg-transparent {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #fff 0% 50%) 50% / 12px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}
.bg-white {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}
.bg-black {
    background: #222;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}
#qr_logo_custom_color_row {
    z-index: 10;
    display: none;
    margin: 10px auto 0 auto;
    text-align: center;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 8px 12px;
    width: fit-content;
    transition: opacity 0.3s ease;
}
.bg-custom {
    background: linear-gradient(135deg, #6366f1 0%, #a5b4fc 100%);
    border-radius: 6px;
    border: 1px solid #d1d5db;
    position: relative;
    z-index: 1;
}
.bg-custom::after {
    content: '+';
    color: #fff;
    font-size: 16px;
    position: absolute;
    top: 2px; right: 6px;
    font-weight: bold;
}

.logo-preview-container {
    position: relative;
    transition: all 0.3s ease;
    overflow: visible;
}

/* 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-"] {
    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;
}

/* Downgrade notice: keep dismiss button inside the banner */
.notice.stolik-downgrade-global { position: relative; padding-right: 32px; }
.notice.stolik-downgrade-global .notice-dismiss { position: absolute; top: 8px; right: 8px; }

.logo-upload-zone .logo-placeholder { position: relative; }
.logo-upload-zone .drag-overlay { position: absolute; inset: 0; display: none; pointer-events: none; z-index: 2; }
.logo-upload-zone.dragover .drag-overlay { display: block; }
.logo-upload-zone .drag-overlay .drag-content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #374151; font-weight: 600; background: rgba(238, 242, 255, 0.35); border-radius: 12px; }

.logo-upload-zone .logo-placeholder,
.logo-upload-zone .logo-placeholder.has-logo {
    min-height: 200px;
}

/* Carousel button states */
.carousel-btn.active,
.carousel-btn.selected {
    border-color: #6366f1 !important;
    background: #eef2ff !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.15) !important;
    transform: translateY(-1px);
}

.carousel-btn:hover {
    border-color: #a5b4fc;
    background: #f8fafc;
    transform: translateY(-0.5px);
}

.stolik-qr-layout {
    display: grid;
    grid-template-columns: 0.33fr 0.67fr;
    gap: 10px;
    margin-top: 30px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}
/* Allow both columns to shrink and never force horizontal overflow */
.stolik-qr-layout > * { min-width: 0; }

/* LEFT PANEL - QR Preview - Make it sticky */
.stolik-qr-preview-panel {
    /* Grid child; width governed by column. */
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #e1e5e9;
    position: sticky;
    top: 32px;
    height: fit-content;
    /* Guard against rare min-content expansion */
    min-width: 0;
    /* Ensure sticky works reliably for grid items */
    align-self: start;
    /* Hint browser for smoother sticky behavior */
    will-change: top;
}

/* Keep preview responsive inside sticky panel */
.qr-preview-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
}

.qr-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 14px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
    overflow: hidden;
}

#qr-preview-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Right panel */
.stolik-qr-config-panel {
    /* Allow shrinking without overflow in grid layout */
    min-width: 0;
}

/* QR Code admin helpers */
.stolik-qr-preview-image { opacity:0; transition: opacity .15s ease; }
.qr-auto-redirect { margin-top:10px; }
.stolik-qr-settings-form { margin:0; padding:0; }
.stolik-qr-toggle-label { display:flex; align-items:center; gap:8px; }
.stolik-qr-auto-desc { margin:4px 0 0; max-width:600px; }
.export-quality,
.export-format { margin:12px 0 8px; max-width:320px; }
.stolik-qr-select-label { display:block; margin-bottom:6px; font-weight:600; }
.stolik-qr-select { width:100%; }
.qr-export-dimensions { margin-top:6px; font-size:11px; color:#374151; }
.stolik-qr-export-note { margin:6px 0 0; font-size:12px; color:#6b7280; }
.qr-stats { margin-top:16px; padding-top:12px; border-top:1px solid #e5e7eb; }
.stolik-qr-stats-title { margin:0 0 8px; font-size:14px; font-weight:600; display:flex; align-items:center; gap:6px; }
.qr-stats-summary { font-size:12px; margin-bottom:8px; display:flex; gap:12px; flex-wrap:wrap; }
.qr-stats-graph { display:grid; grid-template-columns: repeat(7, 1fr); gap:4px; align-items:end; min-height:70px; }
.qr-bar { background:#d1d5db; height:8px; border-radius:3px; position:relative; }
.stolik-label-small { position:absolute; bottom:100%; left:50%; transform:translate(-50%, -4px); font-size:10px; line-height:1; font-weight:600; color:#111827; background:transparent; padding:0; pointer-events:none; user-select:none; }
.qr-bar-tooltip { display:none; position:absolute; bottom:100%; left:50%; transform:translateX(-50%); background:#111827; color:#fff; font-size:10px; padding:2px 4px; border-radius:3px; white-space:nowrap; margin-bottom:4px; }
.stolik-qr-stats-actions { text-align:right; margin-top:8px; }
.stolik-qr-stats-reset { opacity:.8; }

.logo-preview-bg-inner {
    transition: all 0.2s ease !important;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    background-clip: padding-box;
    z-index: 0;
}

.logo-preview-bg-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(
        #f8fafc 0% 25%,
        #f1f5f9 0% 50%
    ) 50% / 12px 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

.logo-preview-bg-inner.has-transparent-bg::before {
    opacity: 1;
}

.qr-logo-preview {
    transition: all 0.2s ease !important;
    position: relative;
    z-index: 1;
}

/* QR Info: accordion on all viewports, closed by default (no `open` attribute) */
.qr-info-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    list-style: none;
}
/* Hide default triangle marker on WebKit */
.qr-info-section > summary::-webkit-details-marker { display: none; }
.qr-info-section > summary::after {
    content: '\25BE'; /* down caret */
    margin-left: 8px;
    transition: transform 0.2s ease;
    font-size: 12px;
    color: #6b7280;
}
.qr-info-section[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.qr-info-section[open] > summary::after { transform: rotate(180deg); }
.qr-info-section .qr-info-content {
    display: block;
    padding: 16px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
.qr-info-section:not([open]) .qr-info-content { display: none; }

.qr-url-display {
    margin-bottom: 16px;
}

.qr-label {
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.qr-url-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.qr-url-text {
    flex: 1;
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
    /* Prefer modern wrapping to avoid any horizontal overflow from long URLs */
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.qr-copy-btn {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.qr-copy-btn:hover {
    background: #e0e7ff;
}

/* Success feedback after copying */
.qr-copy-btn.success {
    background: #10b981 !important;
    color: #fff !important;
}
.qr-copy-btn.success .dashicons {
    color: #fff !important;
}

/* Accessible focus ring */
.qr-copy-btn:focus {
    outline: 2px solid rgba(99,102,241,0.35);
    outline-offset: 2px;
}

.qr-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.qr-actions .button-large {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-actions .button-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/*  PRINT STYLES (QR page) */
@media print {

    @page { margin: 10mm; }

    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* Hide WordPress chrome and non-essential controls */
    #wpadminbar, #adminmenuwrap, #adminmenuback, .notice, .update-nag,
    .wrap > h1, .wrap > p,
    .stolik-qr-config-panel,
    .qr-actions,
    .export-quality,
    .qr-info-section > summary {
        display: none !important;
    }

        /* Make preview panel non-sticky and clean */
    .stolik-qr-preview-panel { position: static !important; border: none !important; box-shadow: none !important; background: #fff !important; }
    .qr-preview-box { box-shadow: none !important; border: none !important; background: #fff !important; }

        /* Hide info/instructions when printing the admin page directly */
        .qr-info-section { display: none !important; }

    /* Make URL/instructions legible on paper */
    .qr-url-text { font-size: 12pt !important; color: #111 !important; }
    .qr-label { font-size: 12pt !important; color: #111 !important; }

    /* Layout: center printable content */
    .stolik-qr-layout { display: block !important; }
    .stolik-qr-preview-panel, .qr-preview-container, .qr-preview-box { width: 100% !important; max-width: 100% !important; }
    #qr-preview-image { display: block; margin: 10mm auto !important; }
}

.stolik-config-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    min-height: 120px;
}

/* Special handling for sections with PRO overlay - ensure adequate height */
.stolik-config-section:has(.pro-overlay) {
    min-height: 600px;
}

/* Fallback for browsers that don't support :has() */
.stolik-config-section.has-pro-overlay {
    min-height: 600px;
}

/* When overlay is present, do not clip its content */
.stolik-config-section:has(.pro-overlay),
.stolik-config-section.has-pro-overlay {
    overflow: visible;
}

.section-header {
    padding: 16px 20px 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.section-icon {
    font-size: 18px;
}

.section-description {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0 0;
    line-height: 1.4;
}

.save-indicator {
    background: #10b981;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-indicator.show {
    opacity: 1;
}

.save-indicator.hide {
    opacity: 0;
}


.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; }

.pro-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.subsection {
    padding: 16px 20px;
    margin-bottom: 16px;
}

.subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.config-item-full {
    grid-column: 1 / -1;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.config-help {
    width: 16px;
    height: 16px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #6b7280;
    cursor: help;
    font-weight: bold;
}

.config-help:hover {
    background: #d1d5db;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.color-input {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.color-value-input {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #374151;
    background: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    min-width: 70px;
    text-align: center;
    cursor: text;
    transition: all 0.2s ease;
    outline: none;
}

.color-value-input:hover {
    border-color: #9ca3af;
}

.color-value-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Valid HEX input styling */
.color-value-input.valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* Invalid HEX input styling - more prominent */
.color-value-input.invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
    animation: shake 0.3s ease-in-out;
}

.color-value-input.invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4) !important;
}

/* Shake animation for invalid input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.color-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #6b7280;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    min-width: 70px;
    text-align: center;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
    transition: background-color 0.2s ease;
}

.color-value:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Eye Style Grid */
.eye-style-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    min-height: 120px;
}

.eye-style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    min-height: 100px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.eye-style-option:hover {
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.eye-style-option.selected {
    border-color: #6366f1;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.eye-icon {
    font-size: 18px;
}

.eye-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
}

.eye-style-option.selected .eye-label {
    color: #6366f1;
    font-weight: 600;
}

/* Range Input */
.range-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%; /* Ensure full width */
    margin: 0; /* Remove any margins */
    padding: 0 10px; /* Add horizontal padding to prevent edge touching */
    box-sizing: border-box; /* Include padding in width calculation */
}

.range-input {
    width: 100%; /* Full width within padded wrapper */
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 7px 0 !important; /* Only vertical margin for thumb centering */
    padding: 0 !important; /* Remove any default padding, override form-group input padding */
    border: none !important; /* Remove any borders that might affect positioning */
}

.range-input::-webkit-slider-thumb {
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #6366f1 !important;
    cursor: pointer !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    margin: 0 !important; /* Ensure no margins */
    padding: 0 !important; /* Ensure no padding */
    position: relative !important;
    transform: translateY(-7px) !important; /* Center thumb vertically (thumb 20px - track 6px = 14px / 2 = 7px) */
}

.range-input::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #6366f1 !important;
    cursor: pointer !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    margin: 0 !important; /* Ensure no margins */
    padding: 0 !important; /* Ensure no padding */
    transform: translateY(-7px) !important; /* Center thumb vertically for Firefox */
}

/* Firefox specific fixes */
.range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    border: none;
    margin: 0;
    padding: 0;
}

/* Additional webkit fixes */
.range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    border: none;
    margin: 0;
    padding: 0;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

.current-value {
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

/* PRO Feature Overlay */
.pro-feature {
    position: relative;
}

.pro-overlay {
    position: relative; /* static flow so content defines height */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 12px;
    z-index: 10;
    padding-top: 40px; /* space above banner */
    padding-bottom: 40px; /* ensure Go PRO button stays inside */
    min-height: auto;
}

.pro-message {
    text-align: center;
    padding: 40px 24px;
    max-width: 400px;
}

.pro-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.pro-message h3 {
    margin: 0 0 16px;
    font-size: 20px;
    color: #111827;
    font-weight: 600;
}

.pro-message p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.5;
    font-size: 15px;
}

/* Logo Upload Area */
.logo-upload-area {
    padding: 24px;
}


#qr-logo-upload-box {
    min-height: 380px;
}

.logo-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    background: #fafbfc;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.logo-dropzone:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.logo-dropzone.dragover {
    border-color: #6366f1;
    background: #f0f9ff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35) inset;
}


.logo-dropzone.has-logo {
    border-style: dashed;
    border-color: #d1d5db;
    background: #fff;
    padding: 32px 16px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.logo-dropzone.uploading {
    opacity: 0.7;
    pointer-events: none;
}

.logo-dropzone.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: spin 1s linear infinite;
    z-index: 20;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    width: 100%;
    min-height: 200px;
    justify-content: center;
}

.logo-placeholder.has-logo {
    position: relative;
}

/* Drag overlay for when logo is already present */
.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.95);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.logo-dropzone.dragover .drag-overlay {
    display: flex;
}

.drag-content {
    text-align: center;
    color: white;
}

.drag-content .upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drag-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
}

.logo-placeholder h4 {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.logo-placeholder p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.upload-hint {
    font-size: 12px !important;
    color: #9ca3af !important;
    font-style: italic;
    margin-top: 6px;
}

.logo-preview {
    max-width: 280px;
    max-height: 280px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: border-radius 0.2s, box-shadow 0.2s;
}

.qr-logo-preview {
    display: block !important;
    margin: 0 auto !important;
    border: none !important;
    transition: border-radius 0.2s, box-shadow 0.2s, background-color 0.2s !important;
    box-shadow: none !important;
    max-width: 102px;
    max-height: 102px;
    width: 102px;
    height: 102px;
    object-fit: contain;
    background: transparent;
}

.logo-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    min-height: 200px;
    max-height: 220px;
    padding: 8px;
    position: relative;
    /* Do not clip frame shadows or scaled content */
    overflow: visible;
}

.logo-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 8px;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.logo-actions .button {
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    font-size: 12px;
    padding: 6px 12px;
}

.logo-source-info {
    font-size: 11px;
    color: #6b7280;
    margin: 0 0 6px 0;
    font-style: italic;
    text-align: center;
}

.menu-logo-available {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
}

.menu-logo-available .button-link {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    text-decoration: underline;
    font-size: 12px;
    padding: 0;
}

.menu-logo-available .button-link:hover {
    color: #4f46e5;
}

.qr-logo-remove-btn {
    color: #dc2626 !important;
    text-decoration: none;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 13px;
}

.qr-logo-remove-btn:hover {
    color: #b91c1c !important;
    text-decoration: underline;
}

/* Responsive Design */

/* Keep QR Color and Background Color side-by-side (50/50) at all widths, while other items stay full-width under 1200px */
@media (max-width: 1200px) {
    /* Re-enable two tracks just for this grid and then span others full width */
    .stolik-qr-config-panel .subsection .config-grid { grid-template-columns: 1fr 1fr; }
    /* Default: full width for items */
    .stolik-qr-config-panel .subsection .config-grid .config-item { grid-column: 1 / -1; }
    /* Exception: first two (QR Color, Background Color) stay 50/50 */
    .stolik-qr-config-panel .subsection .config-grid .config-item:nth-child(-n+2) { grid-column: span 1; }
    /* Make eye style options more touchable on medium screens */
    .eye-style-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Force single-column logo section */
    .logo-section-layout { grid-template-columns: 1fr; gap: 16px; }
}

.icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.icon-option:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.icon-option.selected {
    border-color: #6366f1;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.icon-display {
    font-size: 20px;
    color: #374151;
}

.icon-option.selected .icon-display {
    color: #6366f1;
}

.icon-name {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
}

.icon-option.selected .icon-name {
    color: #6366f1;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for frame section */
@media (max-width: 768px) {
    .frame-style-carousel,
    .frame-icon-carousel {
        gap: 12px;
    }

    .frame-style-option {
        min-width: 80px;
        padding: 16px 12px;
    }

    .frame-icon-option {
        min-width: 60px;
        padding: 12px 8px;
    }

    .frame-icon {
        font-size: 28px;
    }

    .icon-display {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .frame-style-option {
        min-width: 70px;
        padding: 12px 8px;
    }

    .frame-icon-option {
        min-width: 50px;
        padding: 10px 6px;
    }

    .frame-icon {
        font-size: 24px;
    }

    .icon-display {
        font-size: 20px;
    }

    .frame-label,
    .icon-name {
        font-size: 10px;
    }
}

/* Form Elements Styling */
.stolik-qr-config-panel input[type="text"],
.stolik-qr-config-panel select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.stolik-qr-config-panel input[type="text"]:focus,
.stolik-qr-config-panel select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.stolik-qr-config-panel select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 32px;
}

/* Section Icons - Using WordPress Dashicons */
.section-icon {
    font-family: 'dashicons';
    font-size: 18px;
    line-height: 1;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Specific icon codes for WordPress Dashicons */
.section-icon.qr-code::before { content: '\f120'; }
.section-icon.frame::before { content: '\f177'; }
.section-icon.logo::before { content: '\f128'; }

/* Color Input Styling */
.color-input-container { display: flex; align-items: center; gap: 10px; }
.color-input { width: 50px; height: 35px; border: 1px solid #ccd0d4; border-radius: 4px; cursor: pointer; }

/* Range Input Styling */
.range-input-container { display: flex; align-items: center; gap: 10px; }
.range-input-container input[type="range"] {
    flex: 1;
    min-width: 200px; /* Ensure minimum width for better visibility */
}
.range-input-container span {
    min-width: 50px;
    font-weight: bold;
    color: #0073aa; /* WordPress blue for better visibility */
}

/* Form Layout Improvements for QR Settings */
.form-row { margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 600; margin-bottom: 5px; }
.form-group select, .form-group input { padding: 5px 8px; border: 1px solid #ccd0d4; border-radius: 4px; }
.form-group .description { font-size: 12px; color: #666; margin-top: 5px; line-height: 1.4; }

/* Logo Section Layout - Split into two columns */
.logo-section-layout {
    display: grid;
    /* Desktop proportion: Upload (left) 35% / Styling (right) 65% */
    grid-template-columns: 0.35fr 0.65fr;
    gap: 30px;
    align-items: start;
}

.logo-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    min-width: 0;
}

.logo-styling-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 20px;
}

/* Up to 1023px: stack Upload Logo over Logo Style */
@media (max-width: 1023px) {
    .logo-section-layout { grid-template-columns: 1fr; gap: 20px; }
    #qr-logo-upload-box { max-width: 90%; }
    .logo-styling-area {padding: 20px;}

}

/* Make Upload Logo and Logo Style headings align horizontally on desktop */
@media (min-width: 1024px) {
    .logo-section-layout {
        align-items: start;
    }
    .logo-upload-area h3,
    .logo-styling-area h3 {
        margin-top: 0;
        margin-bottom: 0;
        line-height: 1.2;
    }
}

/* Larger drag & drop zone */
.logo-upload-zone {
    width: 100%;
    height: 200px;
    border: 2px dashed #ccd0d4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
}

.logo-upload-zone:hover {
    border-color: #7e9dff;
    background: #f0f4ff;
}

.logo-upload-zone.drag-over {
    border-color: #7e9dff;
    background: #e8f0ff;
}

.logo-preview-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Grid layout for two-column forms */
.form-row.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* QR Logo Styling specific improvements */
#qr-logo-styling-section .form-row:first-of-type .form-group { flex: 1; }
#qr-logo-styling-section .range-input-wrapper { width: 100%; }
#qr-logo-styling-section select { width: 100%; }

/* Override form-group input padding for range inputs specifically */
.form-group .range-input-wrapper .range-input {
    padding: 0 !important;
    margin: 7px 0 !important;
    border: none !important;
    width: 100% !important;
}

.form-group .range-input-wrapper {
    padding: 0 10px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* PRO Features List Styling */
.pro-features-list {
    margin: 20px 0 25px 0;
    text-align: left;
}

.pro-feature {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-areas:
        "icon title"
        ". desc";
    align-items: start;
    gap: 10px 14px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pro-feature .feature-icon {
    grid-area: icon;
    font-size: 22px;
    margin: 2px 0 0 0;
    flex-shrink: 0;
}

.pro-feature strong {
    grid-area: title;
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.pro-feature p {
    grid-area: desc;
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}


.wrap.stolik-wrap {
    max-width: 98% !important;
    width: 100%;
    overflow: visible !important;
}


@media (max-width: 794px) {
    .stolik-qr-layout { display: block !important; width:100% !important; margin-top:20px; }
    .stolik-qr-preview-panel, .stolik-qr-config-panel {
        position: relative !important;
        top:auto !important;
        width:100% !important;
        max-width:100% !important;
        float:none !important;
        min-width:0 !important;
        z-index:auto !important;
        box-sizing:border-box;
    }
    .stolik-qr-preview-panel { margin-bottom:22px; }
    .stolik-qr-layout > * { grid-column:1 / -1 !important; }
    .logo-section-layout { grid-template-columns:1fr !important; display:grid !important; gap:16px !important; }
    .stolik-qr-config-panel .subsection .config-grid { grid-template-columns:1fr !important; gap:16px !important; }
    .stolik-qr-config-panel .subsection .config-grid .config-item { grid-column:1 / -1 !important; }
    .pro-overlay { position: relative !important; min-height: auto !important; padding-top:48px !important; padding-bottom:48px !important; }
    .pro-overlay .pro-message { padding-top:48px !important; }
    .pro-overlay .pro-message .pro-icon img { margin-top:0 !important; }

    .pro-features-list .pro-feature { grid-template-columns: 28px 1fr; gap: 8px 10px; }
}
