/* Fehérvár Gyógyszertár — Hiánylista widget */

.fgyt-widget {
    --fgyt-accent: #7AB648;
    --fgyt-text: #2D2D2D;
    --fgyt-text-muted: #6B6B6B;
    --fgyt-border: #E5E5E0;

    background-color: #F1F1EE;
    border-radius: 24px;
    padding: 32px;
    color: var(--fgyt-text);
    font-family: inherit;
    box-sizing: border-box;
}

.fgyt-widget,
.fgyt-widget *,
.fgyt-widget *::before,
.fgyt-widget *::after {
    box-sizing: border-box !important;
}

.fgyt-widget__title {
    margin: 0 0 4px;
    color: #7A8F5C;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.fgyt-widget__updated {
    margin: 0 0 24px;
    color: var(--fgyt-text-muted);
    font-size: 0.95rem;
}

.fgyt-widget__updated strong {
    color: var(--fgyt-text);
    font-weight: 600;
}

.fgyt-widget__no-list {
    margin: 16px 0 0;
    color: var(--fgyt-text-muted);
    font-style: italic;
}

/* ─── Keresőmező ─────────────────────────────────────── */
.fgyt-widget .fgyt-widget__search {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px;
    padding: 0;
}

.fgyt-widget .fgyt-widget__search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: #9AA590;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.fgyt-widget .fgyt-widget__search-icon svg {
    display: block;
}

.fgyt-widget .fgyt-widget__input {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 16px 48px 16px 52px !important;
    background: #FFFFFF;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.4;
    font-family: inherit;
    color: var(--fgyt-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    min-width: 0;
}

.fgyt-widget__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.fgyt-widget__input:focus {
    border-color: var(--fgyt-accent);
    box-shadow: 0 0 0 4px rgba(122, 182, 72, 0.15);
}

.fgyt-widget__input::placeholder {
    color: #A8A8A8;
}

.fgyt-widget__spinner {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid #E5E5E0;
    border-top-color: var(--fgyt-accent);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.fgyt-widget.is-loading .fgyt-widget__spinner {
    opacity: 1;
    animation: fgyt-spin 0.7s linear infinite;
}

@keyframes fgyt-spin {
    to { transform: rotate(360deg); }
}

/* ─── Táblázat ──────────────────────────────────────── */
.fgyt-widget__table-wrap {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.fgyt-widget.is-loading .fgyt-widget__table-wrap {
    opacity: 0.55;
}

.fgyt-widget__table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
}

.fgyt-widget__table thead {
    background-color: #7A8F5C;
    color: #FFFFFF;
}

.fgyt-widget__table thead th {
    padding: 16px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fgyt-widget__table tbody tr {
    background-color: #FFFFFF;
    transition: background-color 0.12s ease;
}

.fgyt-widget__table tbody tr:nth-child(even) {
    background-color: #FAFAF8;
}

.fgyt-widget__table tbody tr:hover {
    background-color: #F1F5EC;
}

.fgyt-widget__table tbody td {
    padding: 14px 24px;
    border-top: 1px solid var(--fgyt-border);
    word-break: break-word;
}

.fgyt-widget__table tbody tr:first-child td {
    border-top: none;
}

.fgyt-widget__empty-row td {
    text-align: center;
    color: var(--fgyt-text-muted);
    font-style: italic;
    padding: 32px 24px !important;
}

/* ─── Footer + lapozás ──────────────────────────────── */
.fgyt-widget__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.fgyt-widget__pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fgyt-widget__page-btn,
.fgyt-widget__page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: #FFFFFF;
    border: 1px solid var(--fgyt-border);
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fgyt-text);
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    font-family: inherit;
}

.fgyt-widget__page-btn:hover:not(:disabled) {
    background-color: #F1F5EC;
    border-color: var(--fgyt-accent);
}

.fgyt-widget__page-btn.is-active {
    background-color: var(--fgyt-accent);
    border-color: var(--fgyt-accent);
    color: #FFFFFF;
}

.fgyt-widget__page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fgyt-widget__page-ellipsis {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.fgyt-widget__count {
    color: var(--fgyt-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.fgyt-widget__count-current,
.fgyt-widget__count-total {
    color: var(--fgyt-text);
    font-weight: 600;
}

/* ─── Reszponzív ─────────────────────────────────────── */
@media (max-width: 600px) {
    .fgyt-widget {
        padding: 20px;
        border-radius: 18px;
    }

    .fgyt-widget__title {
        font-size: 1.35rem;
    }

    .fgyt-widget__input {
        padding: 14px 44px 14px 46px;
        font-size: 1rem;
    }

    .fgyt-widget__table thead {
        display: none;
    }

    .fgyt-widget__table tbody td {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .fgyt-widget__footer {
        flex-direction: column-reverse;
        align-items: center;
    }

    .fgyt-widget__pagination {
        justify-content: center;
    }
}
