/* Ornamental Design System */
:root {
    --color-paper: #FDFBF7;
    --color-ink: #2C2C2C;
    --color-gold: #C5A059;
    --color-gold-light: #E8DCC5;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
    background-color: #e8dfd0;
    color: #000000;
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23d6cebf' fill-opacity='0.5' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--color-gold-light);
    box-shadow: var(--shadow-soft);
    position: relative;
    border-radius: 4px;
}

.container::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid var(--color-gold);
    pointer-events: none;
    border-radius: 2px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-ink);
    text-align: center;
    font-weight: 400;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-gold-light);
    padding-bottom: 20px;
    margin-top: 0;
}

.hero-intro {
    background: #ffffff;
    border: 1px solid var(--color-gold);
    padding: 30px 20px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow:
        0 10px 30px rgba(197, 160, 89, 0.15),
        0 0 0 4px #fff,
        /* Inner whitespace */
        0 0 0 5px var(--color-gold-light);
    /* Outer ring */
    position: relative;
    animation: slideIn 0.6s ease-out;
    margin-top: 30px;
}

.hero-intro::after {
    content: "✨";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.hero-intro p {
    font-size: 1.25rem;
    color: var(--color-ink);
    margin: 0;
    line-height: 1.6;
    font-family: var(--font-heading);
    /* Switch to Heading font for elegance */
    font-style: italic;
    text-wrap: balance;
    /* Modern CSS for even lines */
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.location-link {
    text-decoration: none;
    color: var(--color-ink);
    border-bottom: 1px dotted var(--color-gold);
    transition: all 0.2s;
    font-weight: 500;
}

.location-link:hover {
    color: var(--color-gold);
    border-bottom: 1px solid var(--color-gold);
    background: rgba(197, 160, 89, 0.1);
    border-radius: 4px;
    padding: 0 4px;
    margin: 0 -4px;
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 15px;
    border-radius: 0 0 0 10px;
    border-left: 1px solid var(--color-gold-light);
    border-bottom: 1px solid var(--color-gold-light);
    display: flex;
    gap: 8px;
    backdrop-filter: blur(5px);
    z-index: 50;
}

.lang-link {
    text-decoration: none;
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
}

.lang-link:hover,
.lang-link.active {
    color: var(--color-gold);
    opacity: 1;
}

.lang-link.active {
    border-bottom: 2px solid var(--color-gold);
}

.flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
}

/* Layout Elements */
.event-details {
    text-align: center;
    margin-bottom: 25px;
    font-style: italic;
    color: #666;
}

.category-section {
    margin-bottom: 25px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    /* Prevent horizontal scroll */
}

.category-title {
    font-size: 1.5rem;
    margin: 0 10px;
    color: var(--color-gold);
    white-space: nowrap;
    /* Keep title on one line */
    flex-shrink: 0;
}

.ornament {
    height: 1px;
    background: var(--color-gold);
    flex-grow: 1;
    opacity: 0.5;
    min-width: 20px;
    /* Ensure some line is visible, but not too much */
}

/* Share Box Styles */
.share-box {
    background: #fdfdfd;
    padding: 20px;
    border: 1px dashed var(--color-gold);
    margin-bottom: 40px;
    border-radius: 4px;
    text-align: center;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
    width: 100%;
    overflow: hidden;
}

.share-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

/* Dish List Items */
.dish-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dish-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted var(--color-gold-light);
    /* Staggered Animation */
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    /* Init hidden for animation */
}

/* Stagger delay for up to 10 items (simple hack) */
.dish-item:nth-child(1) {
    animation-delay: 0.05s;
}

.dish-item:nth-child(2) {
    animation-delay: 0.1s;
}

.dish-item:nth-child(3) {
    animation-delay: 0.15s;
}

.dish-item:nth-child(4) {
    animation-delay: 0.2s;
}

.dish-item:nth-child(5) {
    animation-delay: 0.25s;
}

.dish-item:nth-child(n+6) {
    animation-delay: 0.3s;
}


.dish-info {
    font-size: 1.05rem;
}

.dish-name {
    font-weight: bold;
}

.dish-brought-by {
    font-style: italic;
    font-size: 0.85rem;
    color: #666;
    margin-left: 8px;
}

/* Buttons */
/* Actions */
.dish-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    /* Push to right */
    padding-left: 10px;
}

.action-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.edit-btn:hover {
    color: var(--color-gold);
    background: rgba(197, 160, 89, 0.1);
}

.delete-btn:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.1);
}

.add-to-cat-btn {
    background: none;
    border: 1px dashed var(--color-gold-light);
    color: #999;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.add-to-cat-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: translateY(-1px);
}

#shareBtn {
    background-color: var(--color-gold);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: var(--font-heading);
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#shareBtn:hover {
    background-color: #b08d48;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    /* Pill shape */
    transition: all 0.2s;
    background-color: #fff;
}

.refresh-btn:hover {
    background-color: var(--color-gold);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Quick Add Chips */
.quick-add-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.chip {
    background: #fff;
    border: 1px solid var(--color-gold-light);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--color-ink);
}

.chip:hover {
    background: var(--color-gold-light);
    color: var(--color-ink);
    transform: scale(1.05);
    /* Bounce up */
}

.chip:active {
    transform: scale(0.95);
}

/* Modals */
.add-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Fade effect */
}

.add-modal.active {
    display: flex;
    opacity: 1;
}

.add-modal-content {
    background: #fff;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--color-gold);
    box-shadow: 0 10px 40px rgba(197, 160, 89, 0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.add-modal.active .add-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #999;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #000;
}

/* Forms */
.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-heading);
    color: var(--color-ink);
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-gold-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: #FFFEFC;
    box-sizing: border-box;
    border-radius: 2px;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.1);
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--color-gold);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s;
    border-radius: 2px;
}

button[type="submit"]:hover {
    background-color: #b08d48;
}

/* Claim Interaction */
.claim-wrapper {
    display: inline-flex;
    align-items: center;
}

.claim-reveal-btn {
    background: none;
    border: 1px dashed var(--color-gold);
    color: var(--color-gold);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.claim-reveal-btn:hover {
    background: var(--color-gold);
    color: #fff;
    transform: scale(1.05);
    /* Bounce */
}

.claim-form {
    display: none;
    gap: 5px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.claim-form.active {
    display: flex;
    /* Override via JS */
    opacity: 1;
}

/* Wanted/Requested Styles */
.dish-item.requested {
    background-color: rgba(197, 160, 89, 0.05);
    border: 1px dashed var(--color-gold);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 5px;
}

.requested-badge {
    background: var(--color-gold);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-right: 8px;
    vertical-align: middle;
}

/* Organizer Highlight */
.dish-item.organizer .dish-name {
    color: var(--color-gold);
}

.dish-item.organizer .dish-brought-by {
    color: var(--color-gold);
    font-weight: bold;
}

.dish-item.organizer .dish-info::before {
    content: "★";
    color: var(--color-gold);
    margin-right: 6px;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        margin: 0;
        border: none;
        box-shadow: none;
        padding: 20px;
    }

    .container::before {
        display: none;
    }

    h1 {
        font-size: 2rem;
    }

    .lang-switcher {
        position: absolute;
        top: 0;
        right: 0;
        border-radius: 0 0 0 8px;
        background: #fff;
        border: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
}

/* Print */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    header,
    .share-box,
    .add-to-cat-btn,
    .delete-btn,
    .claim-reveal-btn,
    .request-icon-btn,
    .claim-form,
    #desktopShareOptions,
    .ornament,
    .lang-switcher {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    h1 {
        font-size: 24pt;
        color: #000;
        text-align: center;
    }

    .category-title {
        font-size: 18pt;
        border-bottom: 2px solid #000;
        margin-top: 20px;
        color: #000;
    }

    .dish-list {
        display: block;
    }

    .dish-item {
        border: none;
        border-bottom: 1px solid #ccc;
        padding: 10px 0;
        page-break-inside: avoid;
        display: flex;
        justify-content: space-between;
    }

    .dish-name::before {
        content: "⬜ ";
        font-size: 1.2rem;
        margin-right: 5px;
    }

    .dish-item.requested .dish-name::before {
        content: "❓ ";
    }

    .dish-brought-by {
        font-weight: bold;
        color: #000 !important;
    }
}