/* ===== Desktop header search bar ===== */
.paes-header-bar {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 320px;
}

.paes-header-form {
    display: flex;
    align-items: center;
    position: relative;
    background: #f5f3f0;
    border: 1px solid #eae6e1;
    border-radius: 10px;
    padding: 0 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.paes-header-form:focus-within {
    background: #fff;
    border-color: #c06534;
    box-shadow: 0 0 0 3px rgba(192,101,52,0.12);
}

.paes-header-icon {
    flex-shrink: 0;
    color: #a09a94;
    pointer-events: none;
}

.paes-header-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 10px 10px !important;
    font-size: 14px !important;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    width: 100%;
    color: #2c2825;
    line-height: 1.4;
}

.paes-header-input::placeholder {
    color: #a09a94;
}

/* ===== Dropdown (desktop) ===== */
.paes-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 99999;
    width: 100%;
    max-height: 480px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #eae6e1;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(44,40,37,0.12), 0 4px 12px rgba(44,40,37,0.06);
    -webkit-overflow-scrolling: touch;
}

/* ===== Shared result items ===== */
.paes-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid #f0ece7;
    transition: background 0.15s;
    cursor: pointer;
}

.paes-item:last-of-type {
    border-bottom: none;
}

.paes-item:hover,
.paes-item.paes-active {
    background: #f5e6db;
}

.paes-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #eae6e1;
}

.paes-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f5e6db, #dff0eb);
    color: #c06534;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    border: 2px solid #eae6e1;
}

.paes-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.paes-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c2825;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paes-name mark {
    background: #f5e6db;
    color: #c06534;
    padding: 0 2px;
    border-radius: 3px;
}

.paes-meta {
    font-size: 12px;
    color: #7a7470;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paes-view-all {
    display: block;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #c06534 !important;
    text-decoration: none !important;
    border-top: 1px solid #eae6e1;
    background: #faf9f7;
    border-radius: 0 0 12px 12px;
    transition: background 0.15s;
}

.paes-view-all:hover {
    background: #f5e6db;
}

.paes-empty {
    padding: 24px 14px;
    text-align: center;
    font-size: 13px;
    color: #a09a94;
}

/* ===== Mobile bottom app bar ===== */
.paes-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99990;
    background: #fff;
    border-top: 1px solid #eae6e1;
    box-shadow: 0 -2px 16px rgba(44,40,37,0.06);
    padding: 4px 0;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
}

.paes-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-family: 'DM Sans', sans-serif;
    color: #7a7470;
    text-decoration: none !important;
    padding: 4px 8px;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
}

.paes-bar-item:hover,
.paes-bar-item:active {
    color: #c06534;
}

.paes-bar-search {
    position: relative;
    margin-top: -16px;
}

.paes-bar-search-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, #c06534, #9e4e23);
    color: #fff;
    box-shadow: 0 4px 16px rgba(192,101,52,0.3);
}

.paes-bar-search span:last-child {
    color: #c06534;
    font-weight: 600;
}

/* ===== Full-page search overlay (mobile) ===== */
.paes-fullpage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: #faf9f7;
    flex-direction: column;
}

.paes-fullpage.paes-fp-open {
    display: flex;
}

.paes-fp-body-lock {
    overflow: hidden !important;
}

.paes-fullpage-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eae6e1;
    background: #fff;
    flex-shrink: 0;
}

.paes-fullpage-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f3f0;
    border: 1px solid #eae6e1;
    border-radius: 12px;
    padding: 0 14px;
}

.paes-fullpage-form:focus-within {
    background: #fff;
    border-color: #c06534;
    box-shadow: 0 0 0 3px rgba(192,101,52,0.12);
}

.paes-fp-icon {
    flex-shrink: 0;
    color: #a09a94;
}

.paes-fp-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 12px 0 !important;
    font-size: 16px !important;
    font-family: 'DM Sans', sans-serif !important;
    color: #2c2825;
}

.paes-fp-input::placeholder {
    color: #a09a94;
}

.paes-fp-close {
    flex-shrink: 0;
    border: none;
    background: none;
    font-size: 28px;
    color: #a09a94;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.paes-fp-close:hover {
    color: #2c2825;
}

.paes-fp-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.paes-fp-results .paes-item {
    padding: 12px 16px;
}

.paes-fp-results .paes-thumb {
    width: 48px;
    height: 48px;
}

.paes-fp-results .paes-name {
    font-size: 15px;
    white-space: normal;
}

.paes-fp-results .paes-meta {
    font-size: 13px;
}

.paes-fp-results .paes-view-all {
    border-radius: 0;
    padding: 14px 16px;
    font-size: 14px;
}

.paes-fp-results .paes-empty {
    padding: 40px 16px;
    font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .paes-header-bar {
        display: none !important;
    }

    .paes-mobile-bar {
        display: flex !important;
    }

    .bloglo-header-widget__search {
        display: none !important;
    }

    .bloglo-mobile-nav,
    .bloglo-hamburger,
    .bloglo-header-widgets {
        display: none !important;
    }

    .bloglo-logo {
        margin: 0 auto !important;
        text-align: center;
    }

    .bloglo-header-container {
        justify-content: center !important;
    }

    body {
        padding-bottom: 70px;
    }

    .pae-toast {
        bottom: 80px !important;
    }

    .pae-fab {
        bottom: 80px !important;
    }
}

@media (min-width: 769px) {
    .paes-mobile-bar {
        display: none !important;
    }

    .paes-fullpage {
        display: none !important;
    }
}
