/* ===========================
   Basis-Container
   =========================== */

.ts-wishlist {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: system-ui, sans-serif;
}


/* ===========================
   Wunschlisten-Karten (Liste)
   =========================== */

.ts-wishlist-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 15px;
}

.ts-wishlist-lists-bar {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-wishlist-lists-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ts-wishlist-lists-select label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.ts-wishlist-lists-select-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-wishlist-lists-select-inner select {
    min-width: 180px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background: #ffffff;
}

/* Der "Wunschzettel löschen"-Button in der Reihe */
.ts-btn-delete-list {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.ts-btn-delete-list:hover {
    background: #fecaca;
}

/* Neuer Wunschzettel unterhalb */
.ts-wishlist-lists-new {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ts-wishlist-lists-new input {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background: #ffffff;
}


/* Einzelner Eintrag */
.ts-wishlist-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    align-items: flex-start;
    cursor: grab;
}

.ts-wishlist-card.ts-dragging {
    opacity: 0.7;
    cursor: grabbing;
}

.ts-wishlist-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* Drag-Handle (falls verwendet) */
.ts-drag-handle {
    margin-right: 15px;
    font-size: 1rem;
    cursor: grab;
    user-select: none;
    color: #9ca3af;
}

.ts-drag-handle:hover {
    color: #4b5563;
}

/* Titel / Link */
.ts-wishlist-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: #333;
}

.ts-wishlist-title:hover {
    color: #0073aa; /* WordPress Blau */
}

/* Notiz / Beschreibung */
.ts-wishlist-note {
    margin-top: 6px;
    color: #666;
    font-size: 0.9rem;
}

/* Header im Inhalt: Titel + Kategorie-Badge */
.ts-wishlist-content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

/* Kategorie-Badge */
.ts-wishlist-category-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Button-Bereich unter dem Eintrag */
.ts-wishlist-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Erfüllte Wünsche */
.ts-wishlist-card-fulfilled {
    opacity: 0.7;
    background: #f3f4f6;
}

.ts-wishlist-fulfilled-label {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 600;
}


/* ===========================
   Beschreibung des Wunschzettels
   =========================== */

.ts-wishlist-list-description {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ts-wishlist-list-description textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    font-family: inherit;
}

.ts-wishlist-list-description-status {
    font-size: 0.8rem;
    color: #16a34a;
}

/* Öffentliche Beschreibung */
.ts-wishlist-public-description {
    margin: 6px 0 14px;
    font-size: 0.9rem;
    color: #4b5563;
}


/* ===========================
   Formular-Bereich (Wünsche pflegen)
   =========================== */

/* Wrapper um die Formular-Card */
.ts-wishlist-manage {
    margin-bottom: 20px;
}

/* Card-Optik für das Formular */
.ts-wishlist-form-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

/* Header in der Card: Titel + Badge */
.ts-wishlist-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ts-wishlist-form-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.ts-wishlist-form-subtitle {
    margin: 3px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.ts-wishlist-form-badge {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Das eigentliche Formular */
.ts-wishlist-form {
    margin: 0;
}

/* Grid-Layout für die Felder */
.ts-wishlist-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 12px 16px;
}

/* Feld-Wrapper */
.ts-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Label über dem Feld */
.ts-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

/* Inputs / Textareas */
.ts-field input,
.ts-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Placeholder */
.ts-field input::placeholder,
.ts-field textarea::placeholder {
    color: #9ca3af;
}

/* Fokuszustand */
.ts-field input:focus,
.ts-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Textarea */
.ts-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Hinweis unter einem Feld */
.ts-field-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Notiz über volle Breite */
.ts-field-note {
    grid-column: 1 / -1;
}

/* Footer mit Buttons & Status im Formular */
.ts-wishlist-form-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* Status/Meldung im Formular */
.ts-wishlist-form-status {
    font-size: 0.8rem;
    color: #16a34a;
}


/* ===========================
   Buttons
   =========================== */

.ts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ts-btn-primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.ts-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.ts-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.ts-btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

.ts-btn-ghost {
    background: transparent;
    color: #6b7280;
    border-color: #d1d5db;
}

.ts-btn-ghost:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Spezielle Buttons in der Liste */
.ts-btn-edit {
    background: #0073aa;
    color: #ffffff;
}

.ts-btn-edit:hover {
    background: #005f8d;
}

.ts-btn-delete {
    background: #c0392b;
    color: #ffffff;
}

.ts-btn-delete:hover {
    background: #a93226;
}

.ts-btn-fulfilled {
    background: #e5e7eb;
    color: #374151;
}

.ts-btn-fulfilled:hover {
    background: #d1d5db;
}


/* ===========================
   Abschnitt: Öffentlicher Link / Sharing
   =========================== */

.ts-wishlist-share {
    margin-bottom: 18px;
    padding: 14px 14px 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Kopfzeile: Label links, Button rechts */
.ts-wishlist-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ts-wishlist-share-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

/* Input-Wrapper */
.ts-wishlist-share-input-wrapper {
    position: relative;
}

.ts-wishlist-share-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    color: #111827;
}

/* Hinweistext */
.ts-wishlist-share-hint {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}


/* ===========================
   Responsive Anpassungen
   =========================== */

/* Karten & Formular mobil */
@media (max-width: 768px) {
    .ts-wishlist-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ts-wishlist-card {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .ts-wishlist-image img {
        margin: 0;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .ts-wishlist-form-card {
        padding: 18px 16px;
    }

    .ts-wishlist-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ts-btn {
        width: 100%;
        justify-content: center;
    }

    .ts-wishlist-share-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
