/* ═══════════════════════════════════════════════════════
   Affinity Elements — Owl Guides Search Widget
   Production defaults – pill-shaped, frosted-glass style
   All values overridable via Elementor style controls
   ═══════════════════════════════════════════════════════ */

/* Wrapper — enables alignment control */
.aes-search-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
}

/* Form — frosted glass container holding input + button */
.aes-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 10px 10px 10px 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.aes-search-form:focus-within {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ── Input ──────────────────────────────────────────── */
.aes-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0 28px;
    margin: 0;
    border: none;
    background: #ffffff;
    color: #333;
    font-size: 16px;
    font-family: inherit;
    font-weight: 400;
    line-height: 52px;
    outline: none;
    border-radius: 50px;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    transition: box-shadow 0.25s ease;
}

.aes-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.aes-search-input:focus {
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.15);
}

/* ── Button ─────────────────────────────────────────── */
.aes-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 28px;
    margin: 0;
    border: none;
    background: #444444;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    border-radius: 50px;
    box-sizing: border-box;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.aes-search-btn:hover {
    background: #333333;
}

.aes-search-btn:active {
    transform: scale(0.97);
}

/* Icon sizing inside button */
.aes-search-btn i,
.aes-search-btn svg {
    font-size: 15px;
    width: 15px;
    height: 15px;
    line-height: 1;
}

.aes-btn-icon,
.aes-btn-icon-before,
.aes-btn-icon-after {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.aes-btn-icon-before {
    margin-right: 8px;
}

.aes-btn-icon-after {
    margin-left: 8px;
}

/* ── Results dropdown ───────────────────────────────── */
.aes-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.aes-results-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ── Individual result ──────────────────────────────── */
.aes-result-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.aes-result-item:first-child {
    border-radius: 16px 16px 0 0;
}

.aes-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.aes-result-item:only-child {
    border-radius: 16px;
}

.aes-result-item:hover {
    background-color: #f8f8f8;
}

/* Thumbnail */
.aes-result-thumb {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
}

.aes-result-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.aes-result-content {
    flex: 1 1 auto;
    min-width: 0;
}

.aes-result-title {
    margin: 0 0 4px 0;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.aes-result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.aes-result-title a:hover {
    color: #e91e63;
}

.aes-result-excerpt {
    margin: 0 0 6px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777;
}

.aes-result-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #e91e63;
    text-decoration: none;
    transition: color 0.2s ease;
}

.aes-result-link:hover {
    color: #ad1457;
}

/* ── Results count ──────────────────────────────────── */
.aes-results-count {
    padding: 10px 18px;
    font-size: 12px;
    color: #999;
    text-align: right;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 16px 16px;
}

/* ── State messages ─────────────────────────────────── */
.aes-no-results,
.aes-loading,
.aes-error {
    padding: 28px 18px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.aes-no-results p {
    margin: 0;
}

/* Simple spinner */
.aes-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: aes-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ── Scrollbar styling (webkit) ─────────────────────── */
.aes-search-results::-webkit-scrollbar {
    width: 5px;
}

.aes-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.aes-search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.aes-search-results::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}