/* ============================================================
   Reading Trolls — Wishlists
   ============================================================ */

/* ── Моите списъци ─────────────────────────────────────────── */
/* .rt-wrapper от rt-board.css дава max-width и padding. */

.rt-wishlists-page {
    font-family: var(--rt-font-body);
    color: var(--rt-text);
}

.rt-wishlists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.rt-wishlists-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rt-wishlists-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rt-wishlists-header-right .rt-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--rt-r1);
    color: var(--rt-text-muted);
    background: none !important;
    border: 1px solid var(--rt-border);
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    text-decoration: none;
}

.rt-wishlists-header-right .rt-logout-btn:hover {
    color: var(--rt-text);
    border-color: var(--rt-border-strong);
    background: var(--rt-surface2) !important;
}

.rt-wishlists-new-btn {
    flex-shrink: 0;
}

.rt-wishlists-header-right .rt-theme-switch {
    flex-shrink: 0;
}

.rt-wishlists-header-right .rt-theme-toggle {
    width: auto !important;
    white-space: nowrap;
}

.rt-wishlists-empty {
    text-align: center;
    padding: 48px 16px;
    background: var(--rt-card-bg);
    border: 1px dashed var(--rt-border);
    border-radius: var(--rt-r2);
}

.rt-wishlists-empty p {
    margin: 0 0 8px;
    color: var(--rt-text-muted);
}

.rt-wishlists-hint {
    font-size: 13px;
    color: var(--rt-text-light);
}

/* Login gate — показва се на гост, който е стигнал до /my-wishlists/ */
.rt-wishlists-login-title {
    margin: 0 0 10px;
    font-family: var(--rt-font-display);
    font-size: 1.4em;
    color: var(--rt-text);
}

.rt-wishlists-login-lead {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rt-text);
}

.rt-wishlists-login-gate p {
    margin-bottom: 16px;
    font-size: 15px;
}

.rt-wishlists-login-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.rt-wishlists-login-actions .rt-btn {
    min-width: 140px;
}

/* ── Grid с wishlist карти ─────────────────────────────────── */

.rt-wishlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.rt-wishlist-card {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    padding: 18px 18px 14px;
    box-shadow: var(--rt-shadow);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rt-wishlist-card:hover {
    box-shadow: var(--rt-shadow-hover);
    transform: translateY(-2px);
}

.rt-wishlist-card-title {
    font-family: var(--rt-font-display);
    font-size: 18px;
    margin: 0;
    color: var(--rt-text);
    line-height: 1.3;
}

.rt-wishlist-card-occasion {
    font-size: 13px;
    color: var(--rt-text-muted);
}

.rt-wishlist-card-visibility {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rt-wl-privacy-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--rt-r1);
    padding: 2px 8px;
    line-height: 1.4;
}

.rt-wl-privacy-badge-private {
    color: var(--rt-text-light);
    background: var(--rt-surface2);
    border: 1px solid var(--rt-border);
}

.rt-wl-privacy-badge-link {
    color: var(--rt-primary);
    background: color-mix(in srgb, var(--rt-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--rt-primary) 25%, transparent);
}

.rt-wishlist-card-date {
    font-size: 13px;
    color: var(--rt-primary);
    font-weight: 500;
}

.rt-wishlist-card-count {
    font-size: 13px;
    color: var(--rt-text-light);
    margin-top: auto;
    padding-top: 6px;
}

.rt-wishlist-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--rt-border);
    margin-top: 4px;
    flex-wrap: wrap;
}

.rt-wishlist-card-actions .rt-btn {
    flex: 1;
    min-width: 100px;
}

/* ── Edit page ─────────────────────────────────────────────── */

.rt-wishlist-edit-page {
    font-family: var(--rt-font-body);
    color: var(--rt-text);
}

.rt-wishlist-edit-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rt-wl-title-input {
    flex: 1;
    min-width: 200px;
    font-family: var(--rt-font-display);
    font-size: 24px;
    font-weight: 600;
    padding: 10px 14px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    background: var(--rt-card-bg);
    color: var(--rt-text);
}

.rt-wl-title-input:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}

.rt-wl-share-btn {
    flex-shrink: 0;
    background: var(--rt-primary) !important;
    color: #fff !important;
    border-color: var(--rt-primary) !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(90, 20, 43, 0.18);
}

.rt-wl-share-btn:hover,
.rt-wl-share-btn:focus {
    background: var(--rt-primary-hover, #F4F1EC) !important;
    color: #fff !important;
    border-color: var(--rt-primary-hover, #F4F1EC) !important;
    box-shadow: 0 6px 16px rgba(90, 20, 43, 0.24);
    text-decoration: none !important;
}

/* Wishlist buttons hover fix */
body .rt-wishlists-page .rt-wishlist-card-actions .rt-btn:hover,
body .rt-wishlists-page .rt-wishlist-card-actions .rt-btn:focus,
body .rt-wishlists-page .rt-wishlist-card-actions a.rt-btn:hover,
body .rt-wishlists-page .rt-wishlist-card-actions a.rt-btn:focus,
body .rt-wishlists-page .rt-wishlist-card-actions button.rt-btn:hover,
body .rt-wishlists-page .rt-wishlist-card-actions button.rt-btn:focus {
    color: #5A142B !important;
    background: #F4F1EC !important;
    border-color: #5A142B !important;
    text-decoration: none !important;
}

.rt-wl-meta-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 600px) {
    .rt-wl-meta-row {
        grid-template-columns: 1fr;
    }
}

.rt-wl-meta-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rt-wl-meta-field label {
    font-size: 13px;
    color: var(--rt-text-muted);
    font-weight: 500;
}

.rt-wl-meta-field input {
    padding: 8px 12px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    background: var(--rt-card-bg);
    color: var(--rt-text);
    font-family: var(--rt-font-body);
    font-size: 14px;
}

.rt-wl-meta-field input:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}

.rt-wl-desc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.rt-wl-desc-field label {
    font-size: 13px;
    color: var(--rt-text-muted);
    font-weight: 500;
}

.rt-wl-desc-field textarea {
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    background: var(--rt-card-bg);
    color: var(--rt-text);
    font-family: var(--rt-font-body);
    font-size: 14px;
    resize: vertical;
}

.rt-wl-desc-field textarea:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}

.rt-wl-profile-visible {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--rt-border, #e5e0d8);
    border-radius: 10px;
    background: var(--rt-surface-muted, rgba(0, 0, 0, 0.02));
    cursor: pointer;
}

.rt-wl-visibility-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0 20px;
}

.rt-wl-profile-visible input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 0 4px;
    flex-shrink: 0;
}

.rt-wl-profile-visible-label {
    font-weight: 600;
    color: var(--rt-text);
}

.rt-wl-profile-visible .rt-wl-field-hint {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--rt-text-muted, #666);
    font-weight: 400;
    cursor: default;
}

.rt-wl-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.rt-wl-items-h3 {
    font-family: var(--rt-font-display);
    font-size: 20px;
    margin: 0 0 14px;
    color: var(--rt-text);
}

.rt-wl-items-count {
    color: var(--rt-text-muted);
    font-weight: normal;
    font-size: 16px;
}

/* ── Items grid (книги в wishlist) ─────────────────────────── */

.rt-wl-items-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.rt-wl-item-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 100%;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    transition: box-shadow 0.15s ease;
}

.rt-wl-item-card:hover {
    box-shadow: var(--rt-shadow);
}

.rt-wl-item-card.rt-dragging {
    opacity: 0.5;
    box-shadow: var(--rt-shadow-lg);
}

.rt-wl-item-card.rt-drag-over {
    border-color: var(--rt-primary);
    background: var(--rt-primary-soft);
}

.rt-wl-item-drag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rt-card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
    color: var(--rt-text-light);
    cursor: grab;
    user-select: none;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.rt-wl-item-drag:active {
    cursor: grabbing;
}

.rt-wl-item-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: 0;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--rt-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rt-wl-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-wl-item-placeholder {
    font-size: 48px;
    opacity: 0.4;
}

/* Badge за резервационен статус в edit view */
.rt-wl-item-status-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    margin: 2px 0 3px;
    white-space: nowrap;
}

.rt-wl-item-status-chip.rt-wl-status-chip-confirmed {
    background: var(--rt-success-soft, rgba(42, 122, 59, 0.12));
    color: var(--rt-success, #2a7a3b);
    border: 1px solid rgba(42, 122, 59, 0.25);
}

.rt-wl-item-status-chip.rt-wl-status-chip-pending {
    background: var(--rt-warning-soft, rgba(138, 96, 0, 0.12));
    color: var(--rt-warning, #8a6000);
    border: 1px solid rgba(138, 96, 0, 0.25);
}

/* Gifted / received item state — owner маркирал като подарен.
   Item-level статус в rt_wishlist_items.received_at; override-ва
   визуално активни резервации в public view. */
.rt-wl-item-status-chip.rt-wl-status-chip-gifted {
    background: var(--rt-success-soft, rgba(42, 122, 59, 0.12));
    color: var(--rt-success, #2a7a3b);
    border: 1px solid rgba(42, 122, 59, 0.25);
}

.rt-wl-item-card.rt-wl-item-gifted {
    border-left: 3px solid var(--rt-success, #2a7a3b);
    background: color-mix(in srgb, var(--rt-success, #2a7a3b) 4%, var(--rt-card-bg));
}

.rt-wl-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 12px 8px;
    flex: 1;
}

.rt-wl-item-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--rt-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rt-wl-item-author {
    font-size: 13px;
    color: var(--rt-text-muted);
}

.rt-wl-item-publisher {
    font-size: 12px;
    color: var(--rt-text-muted);
    opacity: 0.9;
}

.rt-wl-item-notes-wrap,
.rt-wl-item-notes-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.rt-wl-item-notes-label,
.rt-wl-item-notes-field > span {
    font-size: 12px;
    color: var(--rt-text-muted);
}

.rt-wl-item-notes-field > span em {
    font-style: normal;
    opacity: 0.8;
}

.rt-wl-item-notes,
.rt-wl-item-notes-input {
    width: 100%;
    min-height: 52px;
    resize: vertical;
    padding: 7px 9px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    font-size: 13px;
    line-height: 1.4;
    background: var(--rt-card-bg);
    color: var(--rt-text);
    box-sizing: border-box;
}

.rt-wl-item-notes:disabled {
    opacity: 0.7;
}

.rt-wl-item-notes-status {
    font-size: 11px;
    color: var(--rt-text-muted);
    min-height: 14px;
}

.rt-wl-item-priority {
    margin-top: 4px;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    font-size: 13px;
    line-height: 1.35;
    background: var(--rt-card-bg);
    color: var(--rt-text);
    cursor: pointer;
}

.rt-wl-item-priority.rt-prio-1 {
    background: var(--rt-card-bg);
    color: var(--rt-text);
    border-color: var(--rt-danger);
    border-left: 15px solid var(--rt-danger);
}

.rt-wl-item-priority.rt-prio-2 {
    background: var(--rt-card-bg);
    color: var(--rt-text);
    border-color: var(--rt-primary);
    border-left: 15px solid var(--rt-border-strong);
}

.rt-wl-item-priority.rt-prio-3 {
    background: var(--rt-card-bg);
    color: var(--rt-text);
    border-color: var(--rt-border);
    border-left: 15px solid var(--rt-primary-soft);
}

.rt-wl-item-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    padding: 0 10px 12px;
}

.rt-wl-item-move {
    width: 28px;
    height: 24px;
    border-radius: var(--rt-r1);
    border: 1px solid var(--rt-border);
    background: var(--rt-card-bg);
    color: var(--rt-text);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    padding: 0;
}

.rt-wl-item-move:hover:not(:disabled) {
    background: var(--rt-primary-soft);
    border-color: var(--rt-primary);
    color: var(--rt-primary);
}

.rt-wl-item-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rt-wl-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--rt-text-light);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.rt-wl-item-remove:hover {
    background: var(--rt-danger);
    color: #fff;
}

/* Gift toggle бутон в controls — owner маркира item като получен подарък.
   Outline стил, става solid (success-soft) когато rt-is-gifted е активен. */
.rt-wl-item-gift-toggle {
    min-height: 28px;
    padding: 4px 8px;
    border-radius: var(--rt-r1);
    border: 1px solid var(--rt-border);
    background: var(--rt-card-bg) !important;
    color: var(--rt-text-muted) !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    white-space: normal;
    text-align: center;
    flex: 1 1 100%;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rt-wl-item-gift-toggle:hover {
    border-color: var(--rt-success, #2a7a3b);
    color: var(--rt-success, #2a7a3b) !important;
    background: var(--rt-success-soft, rgba(42, 122, 59, 0.12)) !important;
}

.rt-wl-item-gift-toggle.rt-is-gifted {
    border-color: var(--rt-success, #2a7a3b);
    background: var(--rt-success-soft, rgba(42, 122, 59, 0.12)) !important;
    color: var(--rt-success, #2a7a3b) !important;
}

/* Телефон: същите вертикални карти, 2 на ред. Drag се скрива — остават ↑↓. */
@media (max-width: 700px) {
    .rt-wl-item-drag {
        display: none;
    }
}

@media (min-width: 701px) {
    .rt-wl-items-grid {
        gap: 16px;
    }
}

@media (min-width: 1100px) {
    .rt-wl-items-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

/* ── Create modal form ─────────────────────────────────────── */

.rt-wl-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.rt-wl-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--rt-text-muted);
    font-weight: 500;
}

.rt-wl-form input,
.rt-wl-form textarea {
    padding: 8px 12px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    background: var(--rt-card-bg);
    color: var(--rt-text);
    font-family: var(--rt-font-body);
    font-size: 14px;
}

.rt-wl-form input:focus,
.rt-wl-form textarea:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}

.rt-wl-form textarea {
    min-height: 70px;
    resize: vertical;
}

/* ── "Добави в wishlist" dropdown в book detail modal ────────
   Стиловете са изравнени 1:1 с .rt-bd-status-dropdown за визуална
   консистентност с TBR/Reading/DNF dropdown-а. */

.rt-bd-wishlist-wrap {
    position: relative;
    display: block;
    margin-top: 0;
    width: 100%;
}

.rt-bd-wishlist-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    padding-right: 32px; /* място за стрелката */
    border-radius: var(--rt-r1);
    border: 1px solid var(--rt-border);
    background-color: var(--rt-card-bg);
    color: var(--rt-text);
    min-height: 38px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s;
    text-align: left;

    /* Native-look стрелка като в <select> — SVG chevron, същия цвят като native */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%23555' d='M6 8.5L1.5 4h9z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 10px;
    appearance: none;
    -webkit-appearance: none;
}

.rt-bd-wishlist-btn:hover {
    border-color: var(--rt-border-strong);
}

.rt-bd-wishlist-btn:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px rgba(var(--rt-primary-rgb, 124, 58, 237), 0.15);
}

.rt-bd-wishlist-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border-strong);
    border-radius: var(--rt-r2);
    box-shadow: var(--rt-shadow-lg);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    display: none;
}

.rt-bd-wishlist-menu.rt-open {
    display: block;
}

.rt-bd-wishlist-menu-empty {
    padding: 12px;
    color: var(--rt-text-muted);
    font-size: 13px;
    text-align: center;
}

.rt-bd-wishlist-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid var(--rt-border);
    font-size: 13px;
}

.rt-bd-wishlist-menu-item:last-child {
    border-bottom: none;
}

.rt-bd-wishlist-menu-item:hover {
    background: var(--rt-primary-soft);
}

.rt-bd-wishlist-menu-item-name {
    color: var(--rt-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-bd-wishlist-menu-item-count {
    font-size: 11px;
    color: var(--rt-text-light);
    margin-left: 8px;
    flex-shrink: 0;
}

.rt-bd-wishlist-menu-divider {
    height: 1px;
    background: var(--rt-border);
}

.rt-bd-wishlist-menu-create {
    padding: 10px 12px;
    color: var(--rt-primary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.12s;
}

.rt-bd-wishlist-menu-create:hover {
    background: var(--rt-primary-soft);
}

/* ── Toast (използваме съществуващия .rt-toast ако има) ───── */

.rt-wl-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rt-text);
    color: var(--rt-card-bg);
    padding: 10px 18px;
    border-radius: var(--rt-r2);
    box-shadow: var(--rt-shadow-lg);
    z-index: 10000;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    max-width: 90%;
}

.rt-wl-toast.rt-show {
    opacity: 1;
}

.rt-wl-toast.rt-success {
    background: var(--rt-success);
    color: #fff;
}

.rt-wl-toast.rt-error {
    background: var(--rt-danger);
    color: #fff;
}

/* ── Small buttons & ghost variant (ако rt-components не ги има) ── */

.rt-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.rt-btn-ghost {
    background: var(--rt-primary-soft);
    color: var(--rt-text);
    border: 1px solid var(--rt-border);
}

.rt-btn-ghost:hover {
    background: var(--rt-surface2);
}

.rt-btn-ghost:hover,
.rt-btn-ghost:focus {
    background: var(--rt-primary-soft) !important;
    color: var(--rt-primary) !important;
    border-color: var(--rt-primary) !important;
    text-decoration: none !important;
}

.rt-btn-copied,
.rt-btn-copied:hover {
    background: transparent !important;
    color: var(--rt-primary) !important;
    border-color: var(--rt-primary) !important;
}

.rt-btn-danger {
    background: transparent;
    color: var(--rt-danger);
    border: 1px solid var(--rt-danger);
}

.rt-btn-danger:hover {
    background: var(--rt-danger);
    color: #fff;
}

/* Disabled state за бутони (share-coming-soon в етап 1+2) */
.rt-btn:disabled,
.rt-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   Stage 3 — Public view (/wishlist/{token}/)
   Read-only страница за гости. Inline cards с "Купи от Ozone" CTA.
   ============================================================ */

.rt-wl-public-page {
    font-family: var(--rt-font-body);
    color: var(--rt-text);
}

.rt-wl-public-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
}

.rt-wl-public-occasion {
    font-size: 16px;
    color: var(--rt-text-muted);
    font-style: italic;
}

.rt-wl-public-date {
    font-size: 15px;
    color: var(--rt-primary);
    font-weight: 600;
}

.rt-wl-public-description {
    padding: 16px 20px;
    background: var(--rt-card-bg);
    border-left: 4px solid var(--rt-primary);
    border-radius: var(--rt-r2);
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--rt-text);
    white-space: pre-wrap;
}

.rt-wl-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.rt-wl-public-card {
    display: flex;
    flex-direction: column;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.rt-wl-public-card:hover {
    box-shadow: var(--rt-shadow-hover);
    transform: translateY(-2px);
}

.rt-wl-public-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    background: var(--rt-surface2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rt-wl-public-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-wl-public-placeholder {
    font-size: 48px;
    opacity: 0.4;
}

.rt-wl-public-priority {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: var(--rt-r1);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    backdrop-filter: blur(2px);
}

.rt-wl-public-priority.rt-prio-1 {
    background: var(--rt-danger);
    color: #fff;
    font-size: 14px;
}

.rt-wl-public-priority.rt-prio-2 {
    background: var(--rt-primary);
    color: var(--rt-primary-fg);
    font-size: 12px;
}

.rt-wl-public-priority.rt-prio-3 {
    background: var(--rt-card-bg);
    color: var(--rt-text-muted);
    border: 1px solid var(--rt-border);
}

.rt-wl-public-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    flex: 1;
}

.rt-wl-public-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--rt-text);
    line-height: 1.3;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rt-wl-public-author {
    font-size: 13px;
    line-height: 1.4;
    color: var(--rt-text-muted);
    margin-bottom: 4px;
    height: calc(13px * 1.4); /* Фиксирана височина — бутоните се подравняват на всички карти */
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rt-wl-public-publisher {
    font-size: 12px;
    line-height: 1.35;
    color: var(--rt-text-muted);
    opacity: 0.9;
    margin-bottom: 4px;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rt-wl-public-item-notes {
    font-size: 13px;
    line-height: 1.4;
    color: var(--rt-text);
    background: var(--rt-surface2, rgba(0, 0, 0, 0.04));
    border-radius: 8px;
    padding: 8px 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rt-wl-public-buy {
    color: #fff !important;
    margin-top: auto;
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 15px !important;
    padding: 12px 12px!important;
}
.rt-wl-public-buy:hover,
.rt-wl-public-buy:focus {
    background: var(--rt-primary-hover, #F4F1EC) !important;
    border-color: var(--rt-primary-hover, #F4F1EC) !important;
    box-shadow: 0 6px 16px rgba(90, 20, 43, 0.24);
    text-decoration: none !important;
}

/* CTA за създаване на собствен wishlist */
.rt-wl-public-cta {
    margin-top: 40px;
    padding: 28px 24px;
    text-align: center;
    background: var(--rt-surface2);
    border: 1px solid var(--rt-border);
    border-radius: 12px;
}

.rt-wl-public-cta p {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--rt-text);
    font-weight: 500;
}

.rt-wl-public-cta .rt-btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--rt-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.15s;
}

.rt-wl-public-cta .rt-btn-primary:hover {
    opacity: 0.88;
}

/* Footer branding — discreet, не attention-grabbing */
.rt-wl-public-footer {
    margin-top: 32px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--rt-border);
}

.rt-wl-public-branding {
    font-size: 13px;
    color: var(--rt-text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.rt-wl-public-branding:hover {
    color: var(--rt-primary);
}

.rt-wl-public-branding strong {
    color: var(--rt-text);
    font-weight: 600;
}

/* Mobile: по-малки cards */
@media (max-width: 600px) {
    .rt-wl-public-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .rt-wl-public-title {
        font-size: 14px;
    }

    .rt-wl-public-author {
        font-size: 12px;
    }

    .rt-wl-public-publisher {
        font-size: 11px;
    }

    .rt-wl-public-priority {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ============================================================
   Stage 4 — Reservation UI (public view + landing pages)
   ============================================================ */

/* Cards с активна резервация — лек faded look */
.rt-wl-public-card.rt-wl-card-reserved {
    opacity: 0.85;
}

.rt-wl-public-card.rt-wl-card-reserved .rt-wl-public-cover img {
    filter: saturate(0.85);
}

/* "Резервирано" badge върху cover-а (top-right) */
.rt-wl-public-reserved-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: var(--rt-r1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    background: var(--rt-success);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Pending badge — оранжев/жълт за "Очаква потвърждение"
   (различен от confirmed зеления за визуална разлика) */
.rt-wl-public-reserved-badge.rt-wl-badge-pending {
    background: var(--rt-warning);
    color: #fff;
}

/* Confirmed badge — explicit модификатор за clarity */
.rt-wl-public-reserved-badge.rt-wl-badge-confirmed {
    background: var(--rt-success);
    color: #fff;
}

/* Gifted badge — owner-marked "получен подарък", visual override на pending/confirmed.
   Inverse styling (white background, success outline) за по-малко натрапчиво показване —
   подаръкът е получен, не е new reservation. */
.rt-wl-public-card.rt-wl-card-gifted {
    opacity: 0.78;
}

.rt-wl-public-reserved-badge.rt-wl-badge-gifted {
    background: rgba(255, 255, 255, 0.9);
    color: var(--rt-success, #2a7a3b);
    border: 1px solid var(--rt-success, #2a7a3b);
}

/* Reserve бутон под "Купи от Ozone" */
.rt-wl-reserve-btn {
    margin-top: 8px;
    width: 100%;
    font-size: 13px;
}

.rt-wl-reserve-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Modal text */
.rt-wl-reserve-intro {
    margin: 8px 0 4px;
    font-size: 14px;
}

.rt-wl-reserve-info {
    font-size: 13px;
    color: var(--rt-text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ── Reservation landing pages (/wishlist/confirm/ + /manage/) ── */

.rt-wl-reservation-landing {
    max-width: 600px;
    margin: 20px auto 0;
    padding-bottom: 32px;
}

.rt-wl-landing-msg {
    padding: 14px 18px;
    border-radius: var(--rt-r2);
    margin-bottom: 24px;
    font-size: 15px;
    border-left: 4px solid;
}

.rt-wl-landing-msg-success {
    background: var(--rt-success-soft);
    border-color: var(--rt-success);
    color: var(--rt-text);
}

.rt-wl-landing-msg-info {
    background: var(--rt-primary-soft);
    border-color: var(--rt-primary);
    color: var(--rt-text);
}

.rt-wl-landing-msg-error {
    background: rgba(220, 60, 60, 0.08);
    border-color: var(--rt-danger);
    color: var(--rt-text);
}

.rt-wl-landing-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 18px;
    padding: 18px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    margin-bottom: 20px;
}

.rt-wl-landing-cover {
    width: 100px;
    height: 150px;
    border-radius: var(--rt-r1);
    overflow: hidden;
    background: var(--rt-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rt-wl-landing-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-wl-landing-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rt-wl-landing-title {
    font-family: var(--rt-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--rt-text);
}

.rt-wl-landing-author {
    font-size: 14px;
    color: var(--rt-text-muted);
}

.rt-wl-landing-meta {
    font-size: 13px;
    color: var(--rt-text-light);
    margin-top: 4px;
}

.rt-wl-landing-meta a {
    color: var(--rt-primary);
}

.rt-wl-landing-status {
    margin-top: 8px;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: var(--rt-r1);
    align-self: flex-start;
}

.rt-wl-status-pending {
    background: var(--rt-warning-soft);
    color: var(--rt-warning);
}

.rt-wl-status-confirmed {
    background: var(--rt-success-soft);
    color: var(--rt-success);
}

.rt-wl-status-cancelled,
.rt-wl-status-expired {
    background: var(--rt-surface2);
    color: var(--rt-text-muted);
}

.rt-wl-landing-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile */
@media (max-width: 600px) {
    .rt-wl-landing-card {
        grid-template-columns: 80px 1fr;
        gap: 12px;
        padding: 14px;
    }

    .rt-wl-landing-cover {
        width: 80px;
        height: 120px;
    }

    .rt-wl-landing-title {
        font-size: 16px;
    }
}

/* ============================================================
   Public wishlist UX fixes
   ============================================================ */

/* Скрива стандартния WordPress/OceanWP page header само при public wishlist view. */
body:has(.rt-wl-public-page) header.page-header.centered-minimal-page-header,
body:has(.rt-wl-public-page) .page-header.centered-minimal-page-header,
body:has(.rt-wl-reservation-landing) header.page-header.centered-minimal-page-header,
body:has(.rt-wl-reservation-landing) .page-header.centered-minimal-page-header {
    display: none !important;
}

/* Малко въздух от ръбовете на мобилни екрани. */
@media (max-width: 700px) {
    .rt-wl-public-page {
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .rt-wl-public-grid {
        gap: 14px;
    }
}

/* Подравняване на CTA зоната в картите. */
.rt-wl-public-card {
    height: 100%;
}

.rt-wl-public-info {
    flex: 1;
    height: 100%;
}

.rt-wl-public-title {
    min-height: calc(1.3em * 2);
}

.rt-wl-public-author {
    min-height: 1.3em;
}

.rt-wl-public-buy,
.rt-wl-reserve-btn {
    min-height: 48px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* "Резервирано" като диагонална щампа върху центъра на корицата. */
.rt-wl-public-reserved-badge,
.rt-wl-public-reserved-badge.rt-wl-badge-pending,
.rt-wl-public-reserved-badge.rt-wl-badge-confirmed {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%) rotate(-18deg);
    z-index: 4;
    padding: 8px 18px;
    border: 3px solid var(--rt-danger, #A8392A);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--rt-danger, #A8392A);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    pointer-events: none;
}


/* ============================================================
   Ozone import секция (edit wishlist page)
   ============================================================ */

.rt-wl-ozone-section {
    background: var(--rt-surface2, #f9f7f4);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 24px 0 20px;
}

.rt-wl-ozone-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--rt-text, #2a2218);
}

.rt-wl-ozone-logo {
    font-size: 18px;
    line-height: 1;
}

.rt-wl-ozone-hint {
    color: var(--rt-text-muted, #7a6f61);
    font-size: 13px;
}

.rt-wl-ozone-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rt-wl-ozone-url-input {
    flex: 1;
    padding: 9px 13px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 7px;
    font-size: 14px;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    transition: border-color 0.15s;
    min-width: 0;
}

.rt-wl-ozone-url-input:focus {
    outline: none;
    border-color: var(--rt-primary, #7b1e3a);
}

/* Preview карта */
.rt-wl-ozone-preview {
    margin-top: 16px;
}

.rt-wl-ozone-preview-error {
    color: var(--rt-danger, #A8392A);
    font-size: 14px;
    padding: 10px 0 2px;
}

.rt-wl-ozone-preview-card {
    display: flex;
    gap: 16px;
    background: var(--rt-card-bg, #fff);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 9px;
    padding: 14px;
    align-items: flex-start;
}

.rt-wl-ozone-preview-cover {
    flex-shrink: 0;
    width: 72px;
}

.rt-wl-ozone-preview-img {
    width: 72px;
    height: 96px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    background: var(--rt-surface2, #f9f7f4);
}

.rt-wl-ozone-preview-img-placeholder {
    width: 72px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--rt-surface2, #f9f7f4);
    border-radius: 4px;
}

.rt-wl-ozone-preview-info {
    flex: 1;
    min-width: 0;
}

.rt-wl-ozone-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rt-text, #2a2218);
    margin-bottom: 4px;
    line-height: 1.35;
}

.rt-wl-ozone-preview-author {
    font-size: 13px;
    color: var(--rt-text-muted, #7a6f61);
    margin-bottom: 4px;
}

.rt-wl-ozone-preview-meta {
    font-size: 11px;
    color: var(--rt-text-muted, #7a6f61);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.rt-wl-ozone-preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rt-wl-ozone-priority-select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.35;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    cursor: pointer;
}

/* Ozone badge на item картата в списъка */
.rt-wl-item-ozone-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--rt-primary, #7b1e3a);
    background: color-mix(in srgb, var(--rt-primary, #7b1e3a) 10%, transparent);
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 6px;
}

/* Link заглавие за ozone items */
.rt-wl-item-title-link {
    color: var(--rt-text, #2a2218);
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.rt-wl-item-title-link:hover {
    color: var(--rt-primary, #7b1e3a);
    text-decoration: none !important;
}

/* Лека визуална разлика за ozone item карти */
.rt-wl-item-card.rt-wl-item-ozone {
    border-left: 3px solid color-mix(in srgb, var(--rt-primary, #7b1e3a) 35%, transparent);
}

.rt-wl-bottom-share {
    margin: 28px 0 10px;
    padding: 10px;
    text-align: center;
    background: var(--rt-primary-soft);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
}

.rt-wl-bottom-share-text {
    margin: 0 0 16px;
    color: var(--rt-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .rt-wl-bottom-share {
        margin: 20px 0 20px !important;
        padding: 20px 16px !important;
    }
}

/* ============================================================
   FAQ секция — my-wishlists страница
   ============================================================ */

.rt-wl-faq {
    max-width: 1100px;
    margin: 48px auto 0;
    padding: 0 20px 48px;
    font-family: var(--rt-font-body);
}

.rt-wl-faq-title {
    font-family: var(--rt-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--rt-text);
    margin: 0 0 20px;
    text-align: center;
}

.rt-wl-faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: start;
}

.rt-wl-faq-item {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    overflow: hidden;
    transition: border-color .15s;
}

.rt-wl-faq-item:has(.rt-wl-faq-q[aria-expanded="true"]) {
    border-color: var(--rt-border-strong);
}

.rt-wl-faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: none;
    border: none;
    font-family: var(--rt-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--rt-text) !important;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}

.rt-wl-faq-q:hover {
    background: var(--rt-surface2);
}

.rt-wl-faq-icon {
    flex-shrink: 0;
    font-size: 18px;
    color: var(--rt-primary);
    transition: transform .2s;
    line-height: 1;
}

.rt-wl-faq-q[aria-expanded="true"] .rt-wl-faq-icon {
    transform: rotate(45deg);
}

.rt-wl-faq-a {
    display: none;
    padding: 0 18px 14px;
    font-size: 14px;
    color: var(--rt-text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--rt-border);
    padding-top: 12px;
}

.rt-wl-faq-a.rt-wl-faq-open {
    display: block;
}

@media (max-width: 600px) {
    .rt-wl-faq {
        padding: 0 16px 40px;
    }
    .rt-wl-faq-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ============================================================
   EXTERNAL ITEMS (OpenGraph) — mirror на Ozone стиловете
   ============================================================ */

.rt-wl-external-section {
    background: var(--rt-surface2, #f9f7f4);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 0 0 20px;
}

.rt-wl-external-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--rt-text, #2a2218);
    flex-wrap: wrap;
}

.rt-wl-external-logo {
    font-size: 18px;
    line-height: 1;
}

.rt-wl-external-hint {
    color: var(--rt-text-muted, #7a6f61);
    font-size: 13px;
}

.rt-wl-external-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rt-wl-external-url-input {
    flex: 1;
    padding: 9px 13px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 7px;
    font-size: 14px;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    transition: border-color 0.15s;
    min-width: 0;
}

.rt-wl-external-url-input:focus {
    outline: none;
    border-color: var(--rt-primary, #7b1e3a);
}

.rt-wl-external-preview {
    margin-top: 16px;
}

.rt-wl-external-preview-error {
    color: var(--rt-danger, #A8392A);
    font-size: 14px;
    padding: 10px 0 2px;
}

.rt-wl-external-preview-card {
    display: flex;
    gap: 16px;
    background: var(--rt-card-bg, #fff);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 9px;
    padding: 14px;
    align-items: flex-start;
}

.rt-wl-external-preview-cover {
    flex-shrink: 0;
    width: 72px;
}

.rt-wl-external-preview-img {
    width: 72px;
    height: 96px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    background: var(--rt-surface2, #f9f7f4);
}

.rt-wl-external-preview-img-placeholder {
    width: 72px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--rt-surface2, #f9f7f4);
    border-radius: 4px;
}

.rt-wl-external-preview-info {
    flex: 1;
    min-width: 0;
}

.rt-wl-external-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rt-text, #2a2218);
    margin-bottom: 4px;
    line-height: 1.35;
}

.rt-wl-external-preview-meta {
    font-size: 11px;
    color: var(--rt-text-muted, #7a6f61);
    text-transform: lowercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.rt-wl-external-preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rt-wl-external-priority-select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.35;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    cursor: pointer;
}

/* External badge на item картата */
.rt-wl-item-external-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    color: var(--rt-text-muted, #7a6f61);
    background: color-mix(in srgb, var(--rt-text-muted, #7a6f61) 12%, transparent);
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 6px;
}

/* Лека визуална разлика за external item карти */
.rt-wl-item-card.rt-wl-item-external {
    border-left: 3px solid color-mix(in srgb, var(--rt-text-muted, #7a6f61) 35%, transparent);
}

/* ============================================================
   EXTERNAL MANUAL FALLBACK форма
   ============================================================ */

.rt-wl-external-manual-card {
    margin-top: 16px;
    background: var(--rt-card-bg, #fff);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 9px;
    padding: 14px;
}

.rt-wl-external-manual-hint {
    margin: 6px 0 14px;
    font-size: 13px;
    color: var(--rt-text-muted);
}

.rt-wl-manual-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--rt-text-muted);
    font-weight: 600;
}

.rt-wl-manual-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 7px;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text);
    font-size: 14px;
    box-sizing: border-box;
}

.rt-wl-manual-field input:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}

/* ============================================================
   UNIFIED PRODUCT LINK секция (Ozone + external в едно поле)
   ============================================================ */

.rt-wl-catalog-search-section {
    background: var(--rt-surface2, #f9f7f4);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 24px 0 0;
}

.rt-wl-catalog-search-row {
    display: flex;
}

.rt-wl-catalog-results {
    margin-top: 14px;
}

.rt-wl-catalog-status {
    margin: 0;
    font-size: 14px;
    color: var(--rt-text-muted, #7a6f61);
}

.rt-wl-catalog-empty {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--rt-text, #2a2218);
}

.rt-wl-catalog-empty a {
    color: var(--rt-primary, #7b1e3a);
    font-weight: 600;
}

.rt-wl-catalog-empty-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--rt-primary, #7b1e3a);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.rt-wl-catalog-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rt-wl-catalog-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--rt-card-bg, #fff);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 8px;
    padding: 10px 12px;
}

.rt-wl-catalog-cover {
    width: 44px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--rt-surface2, #f3eee6);
}

.rt-wl-catalog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rt-wl-catalog-cover-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rt-wl-catalog-info {
    flex: 1;
    min-width: 0;
}

.rt-wl-catalog-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    color: var(--rt-text, #2a2218);
}

.rt-wl-catalog-author {
    margin-top: 2px;
    font-size: 13px;
    color: var(--rt-text-muted, #7a6f61);
}

.rt-wl-catalog-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.rt-wl-catalog-in-list {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--rt-text-muted, #7a6f61);
    font-weight: 600;
}

.rt-wl-catalog-add {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .rt-wl-catalog-card {
        flex-wrap: wrap;
    }
    .rt-wl-catalog-actions,
    .rt-wl-catalog-add,
    .rt-wl-catalog-in-list {
        width: 100%;
        text-align: left;
    }
    .rt-wl-catalog-actions {
        align-items: flex-start;
    }
}

.rt-wl-link-section {
    background: var(--rt-surface2, #f9f7f4);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0 20px;
}

.rt-wl-link-header {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--rt-text, #2a2218);
}

.rt-wl-link-logo {
    font-size: 18px;
    line-height: 1;
}

.rt-wl-link-header a {
    color: var(--rt-primary, #7b1e3a);
}

.rt-wl-link-hint {
    color: var(--rt-text-muted, #7a6f61);
    font-size: 13px;
    flex-basis: 100%;
}

.rt-wl-link-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rt-wl-product-url-input {
    flex: 1;
    padding: 9px 13px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 7px;
    font-size: 14px;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    min-width: 0;
    transition: border-color 0.15s;
}

.rt-wl-product-url-input:focus {
    outline: none;
    border-color: var(--rt-primary, #7b1e3a);
}

.rt-wl-product-preview {
    margin-top: 16px;
}

.rt-wl-product-preview-error {
    color: var(--rt-danger, #A8392A);
    font-size: 14px;
    padding: 0 0 8px;
}

.rt-wl-product-preview-card,
.rt-wl-product-manual-card {
    display: flex;
    gap: 16px;
    background: var(--rt-card-bg, #fff);
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 9px;
    padding: 14px;
}

.rt-wl-product-manual-card {
    flex-direction: column;
}

.rt-wl-product-preview-cover {
    flex-shrink: 0;
    width: 72px;
}

.rt-wl-product-preview-img {
    width: 72px;
    height: 96px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    background: var(--rt-surface2, #f9f7f4);
}

.rt-wl-product-preview-img-placeholder {
    width: 72px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--rt-surface2, #f9f7f4);
    border-radius: 4px;
}

.rt-wl-product-preview-info {
    flex: 1;
    min-width: 0;
}

.rt-wl-product-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rt-text, #2a2218);
    margin-bottom: 4px;
    line-height: 1.35;
}

.rt-wl-product-preview-author {
    font-size: 13px;
    color: var(--rt-text-muted, #7a6f61);
    margin-bottom: 6px;
}

.rt-wl-product-preview-meta {
    font-size: 11px;
    color: var(--rt-text-muted, #7a6f61);
    text-transform: lowercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
}

.rt-wl-product-preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rt-wl-product-priority-select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1.5px solid var(--rt-border, #e0d8cc);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.35;
    background: var(--rt-card-bg, #fff);
    color: var(--rt-text, #2a2218);
    cursor: pointer;
}

.rt-wl-product-manual-hint {
    margin: 6px 0 14px;
    font-size: 13px;
    color: var(--rt-text-muted, #7a6f61);
}

@media (max-width: 600px) {
    .rt-wl-link-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    .rt-wl-product-fetch-btn {
        width: 100%;
    }
    .rt-wl-product-preview-card {
        flex-direction: column;
    }
}
