/**
 * Hide Theme Page Header on pages containing Find My Table
 */
body:has(.yw-fmt-container) .page-header,
body:has(.yw-fmt-container) .entry-header,
.site-main:has(.yw-fmt-container) .page-header,
.page:has(.yw-fmt-container) .page-header {
    display: none !important;
}

/* Viewport Lock & Full Centering (No Scroll) */
html:has(.yw-fmt-container),
body:has(.yw-fmt-container) {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.yw-fmt-container) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

body:has(.yw-fmt-container) .site,
body:has(.yw-fmt-container) #page,
body:has(.yw-fmt-container) .site-content,
body:has(.yw-fmt-container) .ast-container,
body:has(.yw-fmt-container) #content,
body:has(.yw-fmt-container) .entry-content,
body:has(.yw-fmt-container) .post-content,
body:has(.yw-fmt-container) main,
body:has(.yw-fmt-container) #main,
body:has(.yw-fmt-container) article {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Main Minimal Container */
.yw-fmt-container {
    width: 100% !important;
    max-width: 700px !important;
    align-self: center !important;
    margin: auto !important;
    background: #ffffff;
    border: 1px solid #d9c9ba;
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    font-family: "EB Garamond", serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e1e1e;
    box-sizing: border-box !important;
    box-shadow: 0 8px 30px rgba(217, 201, 186, 0.15);
    min-height: 503px;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.yw-fmt-container * {
    box-sizing: border-box;
}

/* Header */
.yw-fmt-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.yw-fmt-event-title {
    font-family: "EB Garamond", Sans-serif;
    font-size: 38px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.yw-fmt-welcome-msg {
    font-size: 21px;
    font-weight: 600;
    font-style: oblique;
    color: #78716c;
    margin: 0;
    line-height: 1.35;
}

/* Elegant Divider Ornament */
.yw-fmt-divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 1.15rem auto;
    max-width: 220px;
    gap: 12px;
}

.yw-fmt-divider-ornament::before,
.yw-fmt-divider-ornament::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #d9c9ba;
}

.yw-fmt-divider-ornament.yw-fmt-line-only {
    height: 1px;
    background-color: #d9c9ba;
    gap: 0;
}

.yw-fmt-divider-ornament.yw-fmt-line-only::before,
.yw-fmt-divider-ornament.yw-fmt-line-only::after {
    display: none;
}

.yw-fmt-divider-symbol {
    font-size: 1.15rem;
    color: #d9c9ba;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}

/* Search Card Wrapper */
.yw-fmt-search-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.yw-fmt-search-heading {
    font-family: "EB Garamond", serif;
    font-size: 1.75rem !important;
    font-weight: 600;
    text-align: center;
    margin: 0 0 1.25rem 0;
    color: #44403c;
    letter-spacing: 0.02em;
}

.yw-fmt-search-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto 1.25rem auto;
}

.yw-fmt-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Capsule / Pill Input */
.yw-fmt-container .yw-fmt-input,
.yw-fmt-input {
    width: 100% !important;
    padding: 0.95rem 3.5rem 0.95rem 1.5rem !important;
    font-size: 1.15rem !important;
    font-family: "EB Garamond", serif !important;
    border: none !important;
    border-radius: 50px !important;
    outline: none !important;
    transition: all 0.25s ease-in-out !important;
    background-color: #faf8f5 !important;
    color: #1e1e1e !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    height: auto !important;
    line-height: normal !important;
}

.yw-fmt-container .yw-fmt-input::placeholder,
.yw-fmt-input::placeholder {
    color: #a8a29e !important;
    font-style: italic !important;
}

.yw-fmt-container .yw-fmt-input:focus,
.yw-fmt-input:focus {
    border: none !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(217, 201, 186, 0.4) !important;
    outline: none !important;
}

.yw-fmt-action-icons {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.yw-fmt-container button.yw-fmt-clear-btn,
.yw-fmt-container .yw-fmt-clear-btn,
.yw-fmt-clear-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 1.35rem !important;
    color: #a8a29e !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: unset !important;
    min-width: unset !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: color 0.2s ease !important;
}

.yw-fmt-container button.yw-fmt-clear-btn:hover,
.yw-fmt-container button.yw-fmt-clear-btn:focus,
.yw-fmt-container button.yw-fmt-clear-btn:active,
.yw-fmt-container .yw-fmt-clear-btn:hover,
.yw-fmt-container .yw-fmt-clear-btn:focus,
.yw-fmt-container .yw-fmt-clear-btn:active,
.yw-fmt-clear-btn:hover,
.yw-fmt-clear-btn:focus,
.yw-fmt-clear-btn:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1e1e1e !important;
}

.yw-fmt-search-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #8c827a;
}

.yw-fmt-search-icon svg {
    width: 20px;
    height: 20px;
    stroke: #8c827a;
    stroke-width: 2;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.yw-fmt-search-icon:hover svg {
    stroke: #1e1e1e;
    transform: scale(1.08);
}

/* Autocomplete Suggestions List */
.yw-fmt-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: #ffffff;
    border: 1px solid #d9c9ba;
    border-radius: 1.25rem;
    margin: 8px 0 0 0;
    padding: 0.5rem;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.08);
}

.yw-fmt-suggestion-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-family: "EB Garamond", serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.75rem;
    transition: background-color 0.15s, color 0.15s;
    color: #292524;
}

.yw-fmt-suggestion-item:hover,
.yw-fmt-suggestion-item.yw-fmt-active {
    background-color: #faf6f0;
    color: #000000;
}

.yw-fmt-suggestion-name {
    font-weight: 500;
}

/* Status Notifications */
.yw-fmt-status-message {
    padding: 0.75rem 1rem;
    font-size: 1.15rem;
    font-family: "EB Garamond", serif;
    text-align: center;
    margin-top: 1rem;
    background: transparent !important;
    border: none !important;
    color: #1e1e1e !important;
}

.yw-fmt-status-message.yw-fmt-not-found {
    background: transparent !important;
    color: #1e1e1e !important;
    border: none !important;
    box-shadow: none !important;
}

.yw-fmt-status-message.yw-fmt-loading {
    background: transparent !important;
    color: #78716c !important;
    border: none !important;
    box-shadow: none !important;
}

/* Minimal Result Display */
.yw-fmt-result-card {
    margin-top: 1.15rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: center;
    box-shadow: none;
    animation: ywFmtFadeIn 0.35s ease-out;
}

@keyframes ywFmtFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yw-fmt-guest-name {
    font-family: "EB Garamond", serif;
    font-size: 1.85rem;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.yw-fmt-table-number-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d9c9ba;
    padding: 0.85rem 2.75rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 15px rgba(217, 201, 186, 0.2);
}

.yw-fmt-table-label {
    font-size: 0.8rem;
    color: #78716c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.yw-fmt-table-val {
    font-family: "EB Garamond", serif;
    font-size: 2.3rem;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.yw-fmt-enjoy-msg {
    font-family: "EB Garamond", serif;
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 500;
    color: #78716c;
    margin-top: 0.85rem;
    letter-spacing: 0.02em;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .yw-fmt-container {
        padding: 1.5rem 1.15rem;
        border-radius: 1.5rem;
        margin: auto !important;
        min-height: 420px;
        max-height: calc(100dvh - 1.5rem);
        width: min(calc(100% - 24px), 700px) !important;
    }
    
    .yw-fmt-header {
        margin-bottom: 1rem;
    }

    .yw-fmt-event-title {
        font-size: 27px;
    }

    .yw-fmt-welcome-msg {
        font-size: 16px;
    }

    .yw-fmt-divider-ornament {
        margin: 0.75rem auto 0.85rem auto;
        max-width: 170px;
    }

    .yw-fmt-search-heading {
        font-size: 1.25rem !important;
        margin-bottom: 0.65rem;
    }

    .yw-fmt-guest-name {
        font-size: 1.5rem;
        margin-bottom: 0.65rem;
    }

    .yw-fmt-input {
        font-size: 1rem !important;
        padding: 0.75rem 2.5rem 0.75rem 1.15rem !important;
    }

    .yw-fmt-result-card {
        margin-top: 1rem;
    }

    .yw-fmt-table-number-box {
        width: 100%;
        max-width: 240px;
        padding: 0.75rem 1.25rem;
    }

    .yw-fmt-table-val {
        font-size: 2rem;
    }
}
