/* HurryTimer Appearance Editor */
.hurryt-editor {
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

/* Suppress native tooltips inside the editor */
.hurryt-editor [title] {
    title: '';
}
.hurryt-editor *[title]:hover::after {
    display: none !important;
}

/* Suppress WP component tooltips */
.hurryt-editor .components-tooltip,
.hurryt-editor .components-popover.components-tooltip {
    display: none !important;
}

/* Theme Strip */
.hurryt-theme-strip {
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e2e4e7;
    background: #fff;
}
.hurryt-theme-strip-label {
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

/* Accent color row */
.hurryt-accent-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e4e7;
}
.hurryt-accent-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}
.hurryt-accent-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.hurryt-accent-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s;
}
.hurryt-accent-swatch:hover {
    transform: scale(1.15);
}
.hurryt-accent-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50% / 10px 10px;
    position: relative;
    overflow: hidden;
}
.hurryt-accent-custom input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
    opacity: 0;
}
.hurryt-theme-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.hurryt-theme-list::-webkit-scrollbar {
    height: 4px;
}
.hurryt-theme-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}
.hurryt-theme-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}
.hurryt-theme-item {
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    border: none;
    background: none;
    padding: 0;
    transition: transform 0.15s;
}
.hurryt-theme-item:hover {
    transform: translateY(-2px);
}
.hurryt-theme-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    transition: border-color 0.15s;
    overflow: hidden;
}
.hurryt-theme-timer-preview {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}
.hurryt-theme-item:hover .hurryt-theme-thumb {
    border-color: #0073aa;
}
.hurryt-theme-name {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    color: #555;
    font-weight: 500;
}

/* Style Strip */
.hurryt-style-strip {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e4e7;
}
.hurryt-style-strip-label {
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}
.hurryt-style-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.hurryt-style-item {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s;
}
.hurryt-style-item:hover {
    border-color: #0073aa;
}
.hurryt-style-item.active {
    border-color: #0073aa;
    background: #f0f7fc;
}
.hurryt-style-name {
    font-size: 11px;
    font-weight: 500;
    color: #555;
}
.hurryt-style-item.active .hurryt-style-name {
    color: #0073aa;
}

/* Editor Body — controls left, preview right */
.hurryt-editor-body {
    display: grid;
    grid-template-columns: 340px 1fr;
    /* Fill most of the screen: the theme, accent and style sections above the
       panels take a lot of the controls column. */
    height: clamp(600px, calc(100vh - 290px), 820px);
    overflow: hidden;
}

/* Controls panel (left) — scrolls independently */
.hurryt-editor-controls {
    border-right: 1px solid #e2e4e7;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Element nav (kept for backward compat but not primary UI) */
.hurryt-element-nav {
    display: none;
}

/* Accordion Sections */
.hurryt-editor-sections {
    border-top: 1px solid #e2e4e7;
}
.hurryt-accordion {
    border-bottom: 1px solid #e2e4e7;
}
.hurryt-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    text-align: left;
    transition: background 0.1s;
}
.hurryt-accordion-header:hover {
    background: #f6f7f7;
}
.hurryt-accordion.is-open .hurryt-accordion-header {
    background: #f6f7f7;
    color: #1d2327;
}
.hurryt-accordion-arrow {
    font-size: 16px;
    font-weight: 400;
    color: #999;
}
.hurryt-accordion-body {
    padding: 12px 16px;
}

/* Panels (inside accordions) */
.hurryt-editor-panels {
    padding: 0;
}
.hurryt-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hurryt-panel-body .components-range-control {
    margin-bottom: 0;
}
.hurryt-panel-body .components-base-control {
    margin-bottom: 0;
}
/* Override WP components uppercase labels */
.hurryt-panel-body .components-base-control__label,
.hurryt-panel-body .components-input-control__label {
    text-transform: none !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #1d2327 !important;
    letter-spacing: normal !important;
}

/* Color row */
.hurryt-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.hurryt-color-label {
    font-size: 11px;
    color: #444;
    font-weight: 500;
}
.hurryt-color-input {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

/* CSS textarea */
.hurryt-css-textarea {
    width: 100%;
    min-height: 180px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.6;
    resize: vertical;
}

/* Preview (right) — always visible, vertically centered */
.hurryt-editor-preview {
    background: #f6f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}
.hurryt-live-preview {
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    word-wrap: break-word;
}
/* The preview root carries .hurryt-fluid, so it is a size container exactly like on the
   frontend; the fluid sizes therefore follow the preview's own width (mobile / full screen). */
.hurryt-live-preview .hurrytimer-campaign {
    overflow: visible !important;
}
.hurryt-preview-headline {
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
}
.hurryt-preview-headline:hover {
    outline: 2px dashed rgba(0, 115, 170, 0.5);
    outline-offset: 3px;
}
.hurryt-preview-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    cursor: pointer;
}

/* Interactive preview elements */
.hurryt-preview-interactive {
    cursor: pointer;
    border-radius: 3px;
    transition: outline 0.15s;
}
.hurryt-preview-interactive:hover {
    outline: 2px dashed rgba(0, 115, 170, 0.5);
    outline-offset: 3px;
}

/* Selected preview element */
.hurryt-preview-selected {
    outline: 2px solid #0073aa;
    outline-offset: 3px;
}

/* PRO gate overlay */
.hurryt-pro-gate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    min-height: 180px;
}

/* Upgrade prompt */
.hurryt-upgrade-prompt {
    background: #f9f3ff;
    border: 1px solid #e0d0f0;
    border-radius: 6px;
    padding: 20px 16px;
    text-align: center;
    color: #444;
    font-size: 13px;
    line-height: 1.5;
}
.hurryt-upgrade-prompt p {
    margin: 0 0 12px;
}

/* Upgrade button */
.hurryt-upgrade-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.hurryt-upgrade-btn:hover {
    background: #6d28d9;
    color: #fff;
}


/* Text fields */
.hurryt-text-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hurryt-text-field label {
    font-size: 11px;
    font-weight: 500;
    color: #444;
}
.hurryt-text-field input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* Panel hint text */
.hurryt-panel-hint {
    font-size: 11px;
    color: #888;
    margin: 0 0 8px;
}

/* Per-unit section */
.hurryt-per-unit-section {
    border-top: 1px solid #e2e4e7;
    padding-top: 12px;
    margin-top: 4px;
}
.hurryt-per-unit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f1;
}
.hurryt-per-unit-row:last-child {
    border-bottom: none;
}
.hurryt-per-unit-label-field {
    flex: 1;
}
.hurryt-per-unit-row .components-base-control {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Device Switcher — top-right of preview area */
.hurryt-device-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
}
.hurryt-device-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
}
.hurryt-device-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}
.hurryt-device-btn.is-mobile {
    background: #f0f7fc;
    border-color: #0073aa;
    color: #0073aa;
}
.hurryt-device-icon {
    display: flex;
    align-items: center;
    line-height: 1;
}
.hurryt-device-icon svg {
    width: 18px;
    height: 18px;
}

/* Preview Frame — viewport widths only, no decoration */
.hurryt-preview-frame {
    width: 100%;
    transition: max-width 0.3s ease;
    margin: 0 auto;
}
.hurryt-preview-frame.hurryt-preview-desktop {
    max-width: 100%;
}
.hurryt-preview-frame.hurryt-preview-mobile {
    max-width: 375px;
}

/* Theme strip header with Show All button */
.hurryt-theme-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.hurryt-show-all-btn {
    border: none;
    background: none;
    color: #0073aa;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
}
.hurryt-show-all-btn:hover {
    background: #f0f7fc;
}

/* Grid mode for Show All */
.hurryt-theme-list-grid {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
}

/* Headline formatting toolbar */
.hurryt-headline-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}
.hurryt-fmt-btn {
    width: 28px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}
.hurryt-fmt-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

/* Expanded CSS editor */
.hurryt-css-expanded {
    min-height: 350px !important;
    font-size: 13px !important;
}
.hurryt-css-expand-btn {
    border: none;
    background: none;
    color: #0073aa;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
}
.hurryt-css-expand-btn:hover {
    text-decoration: underline;
}

/* Rich headline editor */
.hurryt-rich-editor {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.hurryt-headline-editable {
    min-height: 60px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    cursor: text;
}
.hurryt-headline-editable:empty::before {
    content: 'Enter headline text...';
    color: #aaa;
}
.hurryt-headline-source {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: none;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}
.hurryt-rich-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.hurryt-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    border: none;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
}
.hurryt-toolbar-btn:hover {
    background: #e8e8e8;
    color: #0073aa;
}
.hurryt-toolbar-sep {
    width: 1px;
    height: 18px;
    background: #ddd;
    margin: 0 4px;
}

/* Active theme */
.hurryt-theme-item.active .hurryt-theme-thumb {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px #0073aa;
}
.hurryt-theme-item.active .hurryt-theme-name {
    color: #0073aa;
    font-weight: 600;
}
.hurryt-theme-strip-actions {
    display: flex;
    gap: 4px;
}

/* Clearable color row */
.hurryt-color-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hurryt-color-clear {
    border: none;
    background: none;
    color: #757575;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.hurryt-color-clear:hover {
    color: #d63638;
}
.hurryt-color-input.is-empty {
    opacity: 0.45;
    background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 50% / 8px 8px;
}

/* PRO tag on locked themes + the message shown when one is tried in the free version */
.hurryt-theme-item { position: relative; }
.hurryt-theme-pro-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f0b849;
    color: #1d2327;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.hurryt-theme-locked {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 4px solid #f0b849;
    background: #fff8e5;
}
.hurryt-theme-locked p { margin: 0 0 8px; font-size: 12px; }
.hurryt-theme-locked .hurryt-link-btn { margin-left: 10px; }

/* PRO badge + upsell */
.hurryt-pro-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #f0b849;
    color: #1d2327;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.hurryt-pro-upsell {
    align-items: flex-start;
}

/* Page picker (sticky bar display rules) */
.hurryt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
}
.hurryt-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 2px 4px 2px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 12px;
    background: #f6f7f7;
    font-size: 12px;
    line-height: 1.6;
}
.hurryt-chip.is-missing {
    border-color: #d63638;
    color: #d63638;
}
.hurryt-chip button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
    color: inherit;
}
.hurryt-page-suggestions {
    margin: 4px 0 0;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
    list-style: none;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    background: #fff;
}
.hurryt-page-suggestions li {
    margin: 0;
}
.hurryt-page-suggestions button {
    display: block;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
}
.hurryt-page-suggestions button:hover,
.hurryt-page-suggestions button:focus {
    background: #f0f6fc;
}

/* Full-screen preview */
.hurryt-editor-preview.is-fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000000;
    padding: 0;
    justify-content: flex-start;
    align-items: stretch;
    overflow: auto;
    background: #fff;
}
.hurryt-editor-preview.is-fullscreen.is-dark {
    background: #101418;
}
.hurryt-fs-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: #1d2327;
    color: #fff;
}
.hurryt-fs-title {
    font-weight: 600;
    margin-right: auto;
}
.hurryt-fs-group {
    display: inline-flex;
}
.hurryt-fs-group .hurryt-fs-btn:not(:first-child) {
    border-left: 0;
    border-radius: 0 4px 4px 0;
}
.hurryt-fs-group .hurryt-fs-btn:not(:last-child) {
    border-radius: 4px 0 0 4px;
}
.hurryt-fs-btn {
    padding: 5px 12px;
    border: 1px solid #50575e;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}
.hurryt-fs-btn:hover {
    border-color: #fff;
}
.hurryt-fs-btn.active {
    background: #fff;
    color: #1d2327;
    border-color: #fff;
}
.hurryt-fs-exit kbd {
    margin-left: 6px;
    padding: 0 4px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: 10px;
    opacity: 0.7;
}
.hurryt-fs-stage {
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    padding: 48px 0;
    transition: padding-left 0.2s ease;
}
/* The controls drawer pushes the preview aside so the timer is never covered
   (on very narrow screens there is no room, so it overlays instead). */
.hurryt-editor.fs-controls-open .hurryt-fs-stage {
    padding-left: 340px;
}
@media (max-width: 760px) {
    .hurryt-editor.fs-controls-open .hurryt-fs-stage {
        padding-left: 0;
    }
}
.hurryt-editor-preview.is-fullscreen .hurryt-preview-frame {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}
.hurryt-editor-preview.is-fullscreen .hurryt-preview-frame.hurryt-preview-fs-desktop {
    max-width: none;
    width: 100%;
}
.hurryt-editor-preview.is-fullscreen .hurryt-preview-frame.hurryt-preview-fs-tablet {
    max-width: 768px;
}
.hurryt-editor-preview.is-fullscreen .hurryt-preview-frame.hurryt-preview-fs-mobile {
    max-width: 375px;
}
.hurryt-editor-preview.is-fullscreen .hurryt-live-preview {
    cursor: default;
}
/* Corner icon in the Settings box title */
.hurryt-fullscreen {
    cursor: pointer;
}

/* Controls drawer over the full-screen preview */
.hurryt-fs-controls-btn {
    margin-right: 4px;
}
.hurryt-fs-toolbar {
    min-height: 46px;
    box-sizing: border-box;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.hurryt-fs-btn {
    white-space: nowrap;
}
.hurryt-editor.fs-controls-open .hurryt-editor-controls {
    position: fixed;
    top: 46px;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    width: 340px;
    max-width: 92vw;
    z-index: 1000001;
    background: #fff;
    border-right: 1px solid #c3c4c7;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25);
}


/* A PRO theme tried on the user's own timer (free version) */
.hurryt-trial-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 52px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 6px 10px;
    border-radius: 4px;
    background: #fcf9e8;
    border: 1px solid #dba617;
    font-size: 12px;
}
.hurryt-trial-banner button {
    border: 0;
    background: none;
    color: #2271b1;
    text-decoration: underline;
    cursor: pointer;
}
