/* =========================================================
   ØNSKEBOKSEN - MODERNE STYLING
========================================================= */

body {
    background-color: rgba(0,0,0,0.45);
    background-image: url("../billeder/toon.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: color-dodge;
    background-position: bottom;
    background-attachment: fixed;
}

.wishbox-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px 40px;
}

/* =========================================================
   HEADER SECTION
========================================================= */

.wishbox-header {
    background: white;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.wishbox-title-section h1 {
    margin: 0 0 4px 0;
    font-size: 2rem;
    color: var(--primary-blue);
}

.wishbox-title-section p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.wishbox-actions {
    display: flex;
    gap: 10px;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn-primary,
.btn-secondary {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #003a7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 68, 148, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* =========================================================
   SEARCH SECTION
========================================================= */

.search-section {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 1.1rem;
    pointer-events: none;
    opacity: 0.5;
}

#searchInput {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: var(--primary-blue);
}

.clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 4px;
    line-height: 1;
}

.clear-search:hover {
    color: #333;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    color: #666;
}

.view-btn:hover {
    background: white;
    color: #333;
}

.view-btn.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =========================================================
   TABS
========================================================= */

.tabs-section {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    background: #f8f9fa;
    border: 2px solid transparent;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.tab-icon {
    font-size: 1.3rem;
}

.tab-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.tab-count {
    font-size: 0.75rem;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.tab-btn.active .tab-count {
    background: rgba(255,255,255,0.25);
}

/* =========================================================
   WISHES CONTAINER
========================================================= */

.wishes-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* LIST VIEW (default) */
.wishes-list.list-view .wish-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wishes-list.list-view .wish-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 68, 148, 0.15);
    transform: translateY(-1px);
}

.wishes-list.list-view .wish-card.pinned {
    border-color: #ffc107;
    background: #fffbf0;
}

.wishes-list.list-view .wish-pin {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.wishes-list.list-view .wish-main {
    flex: 1;
    min-width: 0;
}

.wishes-list.list-view .wish-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wishes-list.list-view .wish-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.wishes-list.list-view .wish-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wishes-list.list-view .wish-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 12px;
    align-items: center;
}

.wishes-list.list-view .wish-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.wishes-list.list-view .wish-description {
    display: none;
}

/* CARD VIEW */
.wishes-list.card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.wishes-list.card-view .wish-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wishes-list.card-view .wish-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 68, 148, 0.15);
    transform: translateY(-2px);
}

.wishes-list.card-view .wish-card.pinned {
    border-color: #ffc107;
    background: #fffbf0;
}

.wishes-list.card-view .wish-pin {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
}

.wishes-list.card-view .wish-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 8px 0;
}

.wishes-list.card-view .wish-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wishes-list.card-view .wish-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishes-list.card-view .wish-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.wishes-list.card-view .wish-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* =========================================================
   BADGES
========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-type {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-category {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-ny {
    background: #e3f2fd;
    color: #1565c0;
}

.status-review {
    background: #fff3e0;
    color: #e65100;
}

.status-igangsat {
    background: #fff9c4;
    color: #f57f17;
}

.status-gennemfort {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-afvist {
    background: #ffebee;
    color: #c62828;
}

/* =========================================================
   ACTION BUTTONS
========================================================= */

.btn-vote {
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-vote:hover {
    background: #fff3cd;
    border-color: #ffc107;
    transform: scale(1.05);
}

.btn-vote.voted {
    background: #fff3cd;
    border-color: #ffc107;
    font-weight: 600;
}

.btn-vote:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-read-more {
    padding: 6px 12px;
    border: 1px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-read-more:hover {
    background: var(--primary-blue);
    color: white;
}

/* =========================================================
   LOADING & EMPTY STATES
========================================================= */

.loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-card {
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.empty-state p {
    color: #666;
    margin: 0 0 20px 0;
}

/* =========================================================
   SLIDERS (Form & Admin)
========================================================= */

.slider {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 500px;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.slider.slider-left {
    left: 0;
}

.slider.slider-right {
    right: 0;
}

.slider.active {
    pointer-events: all;
}

.slider-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.slider.active .slider-overlay {
    opacity: 1;
    pointer-events: all;
}

.slider-content {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-left .slider-content {
    transform: translateX(-100%);
}

.slider-right .slider-content {
    transform: translateX(100%);
}

.slider.active .slider-content {
    transform: translateX(0);
}

.slider-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.slider-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-blue);
}

.slider-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.slider-close:hover {
    background: #f5f5f5;
    color: #333;
}

.slider .slider-content > form,
.slider .slider-content > div:not(.slider-header) {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* =========================================================
   FORMS
========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.category-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

.category-pill:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
}

.category-pill input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.category-pill input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-blue);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.conditional-field {
    display: none;
}

.conditional-field.show {
    display: block;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

/* Quill editor styling */
#quillEditor {
    background: white;
}

.ql-toolbar {
    border: 2px solid #e8e8e8 !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
}

.ql-container {
    border: 2px solid #e8e8e8 !important;
    border-radius: 0 0 8px 8px !important;
    font-size: 0.95rem !important;
}

.ql-editor:focus {
    outline: none;
}

/* =========================================================
   ADMIN PANEL
========================================================= */

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e8e8;
  max-height:75px;
}

.admin-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -14px;
    font-size: 0.95rem;
}

.admin-tab:hover {
    color: var(--primary-blue);
    background: rgba(0, 68, 148, 0.05);
}

.admin-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
}

.admin-wishes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-wish-card {
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
}

.admin-wish-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #111;
}

.admin-wish-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.admin-wish-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-wish-actions button {
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-wish-actions button:hover {
    background: #f5f5f5;
}

.admin-wish-actions .btn-danger {
    color: #c62828;
    border-color: #ffcdd2;
}

.admin-wish-actions .btn-danger:hover {
    background: #ffebee;
}

/* =========================================================
   MODALS
========================================================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-wide {
    max-width: 600px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin: 0 0 16px 0;
    color: var(--primary-blue);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* =========================================================
   TOAST NOTIFICATIONS
========================================================= */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-success {
    border-left: 4px solid #4caf50;
}

.toast.toast-error {
    border-left: 4px solid #f44336;
}

.toast.toast-info {
    border-left: 4px solid #2196f3;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .wishbox-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wishbox-actions {
        width: 100%;
    }

    .wishbox-actions button {
        flex: 1;
    }

    .search-section {
        flex-direction: column;
    }

    .tabs-section {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        min-width: 100px;
        flex: 0 0 auto;
    }

    .wishes-list.card-view {
        grid-template-columns: 1fr;
    }

    .slider {
        width: 100%;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        min-width: auto;
    }
}

/* =========================================================
   UTILITY CLASSES
========================================================= */

.hidden {
    display: none !important;
}

.admin-only {
    /* Vises kun når JS tilføjer display */
}
/* Own wish highlight */
.wish-card.own-wish {
    border-left: 3px solid #004494;
    background: #f8fbff;
}

/* Small delete button */
.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Own wish highlight */
.wish-card.own-wish {
    border-left: 3px solid #004494;
    background: #f8fbff;
}

/* Small delete button */
.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Creator info styling */
.wish-creator {
    font-size: 0.85rem;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

/* Description preview in list view */
.wish-description-preview {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Card view description (already exists, but making sure it's complete) */
.wishes-list.card-view .wish-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Edit conditional fields */
.edit-conditional-field {
    display: none;
}

.edit-conditional-field.show {
    display: block;
}