/* Copy first 316 lines exactly */
/* Simple Clean Search */
.simple-search {
    width: 350px;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--bs-body-bg, #fff);
    border: 2px solid var(--bs-gray-300, #e1e5e9);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: text;
}

.search-container:focus-within {
    border-color: var(--bs-primary, #009ef7);
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--bs-body-color, #181c32);
}

.search-input::placeholder {
    color: var(--bs-gray-500, #a1a5b7);
}

.clear-btn {
    background: none;
    border: none;
    color: var(--bs-gray-500, #a1a5b7);
    padding: 8px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn.show {
    opacity: 1;
    visibility: visible;
}

.clear-btn:hover {
    background: var(--bs-gray-200, #f1f3f4);
    color: var(--bs-danger, #f1416c);
}

.search-btn {
    background: var(--bs-primary, #009ef7);
    border: none;
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.search-btn:disabled {
    background: var(--bs-gray-500, #a1a5b7);
    cursor: not-allowed;
}

/* Search Results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.15);
    border: 1px solid var(--bs-gray-200, #eff2f5);
}

.result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-gray-100, #f8f9fa);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.result-item:last-child {
    border-bottom: none;
}

.result-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--bs-primary, #009ef7) 0%, var(--bs-info, #7239ea) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    color: var(--bs-gray-800, #1e2129);
    margin-bottom: 2px;
    line-height: 1.3;
    font-size: 14px;
}

.result-meta {
    font-size: 12px;
    color: var(--bs-gray-500, #a1a5b7);
}

.search-loading,
.search-empty,
.search-error {
    padding: 30px 20px;
    text-align: center;
    color: var(--bs-gray-500, #a1a5b7);
}

.search-loading i {
    animation: spin 1s linear infinite;
    color: var(--bs-primary, #009ef7);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.search-empty i,
.search-error i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Search term highlighting */
.highlight {
    background: var(--bs-warning, #ffc700);
    color: var(--bs-gray-900, #181c32);
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .simple-search {
        width: 300px;
    }

    .search-container {
        border-radius: 20px;
    }

    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 576px) {
    .simple-search {
        width: 250px;
    }
}

/* ========================================
   TOAST ALERT - Right Side Middle Position
   ======================================== */
.guest-chart-alert {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translate(450px, -50%); /* Slide from right + vertically centered */
    max-width: 380px;
    width: calc(100% - 60px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1050; /* Below sticky ad (1060) */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.guest-chart-alert.show {
    transform: translate(0, -50%); /* Slide in + stay vertically centered */
    opacity: 1;
    pointer-events: auto;
}

.guest-chart-alert-content {
    position: relative;
    color: white;
}

.guest-chart-alert-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-chart-alert-close:hover {
    background: #f44336;
    transform: scale(1.1) rotate(90deg);
}

.guest-chart-alert-close:hover i {
    color: white !important;
}

.guest-chart-alert-close i {
    color: #764ba2;
    transition: color 0.25s;
}

.guest-chart-alert h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.guest-chart-alert p {
    margin: 0 0 18px 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

.guest-chart-alert-buttons {
    display: flex;
    gap: 10px;
}

.guest-chart-alert-btn {
    padding: 11px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
    flex: 1;
}

.guest-chart-alert-btn-primary {
    background: white;
    color: #764ba2;
}

.guest-chart-alert-btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.guest-chart-alert-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.guest-chart-alert-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* Mobile Responsive - VERY COMPACT Alert */
@media (max-width: 768px) {
    .guest-chart-alert {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 12px;
        transform: translateY(-300px);
        border-radius: 8px;
    }

    .guest-chart-alert.show {
        transform: translateY(0);
    }

    .guest-chart-alert h3 {
        font-size: 13px;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .guest-chart-alert p {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .guest-chart-alert-buttons {
        flex-direction: row;
        gap: 6px;
    }

    .guest-chart-alert-btn {
        flex: 1;
        padding: 7px 10px;
        font-size: 11px;
        border-radius: 6px;
    }

    .guest-chart-alert-close {
        width: 24px;
        height: 24px;
        top: -8px;
        right: -8px;
    }

    .guest-chart-alert-close i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .guest-chart-alert {
        top: 8px;
        right: 8px;
        left: 8px;
        padding: 8px 10px;
    }

    .guest-chart-alert h3 {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .guest-chart-alert p {
        font-size: 10px;
        margin-bottom: 6px;
        -webkit-line-clamp: 1;
    }

    .guest-chart-alert-buttons {
        gap: 5px;
    }

    .guest-chart-alert-btn {
        padding: 6px 8px;
        font-size: 10px;
    }

    .guest-chart-alert-close {
        width: 22px;
        height: 22px;
        top: -7px;
        right: -7px;
    }

    .guest-chart-alert-close i {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .guest-chart-alert {
        padding: 6px 8px;
    }

    .guest-chart-alert h3 {
        font-size: 11px;
    }

    .guest-chart-alert p {
        display: none;
    }

    .guest-chart-alert-buttons {
        gap: 4px;
    }

    .guest-chart-alert-btn {
        padding: 5px 7px;
        font-size: 9px;
    }
}
/* ========================================
   STICKY BOTTOM AD - SMOOTH ANIMATION
   ======================================== */
.sticky-bottom-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.99) 100%);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1060;
    padding: 12px 10px;
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(102, 126, 234, 0.1);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sticky-bottom-ad.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sticky-ad-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticky-ad-close {
    position: absolute;
    top: -10px;
    right: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e1e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    z-index: 10;
}

.sticky-ad-close:hover {
    background: #f44336;
    border-color: #f44336;
    transform: scale(1.15) rotate(90deg);
}

.sticky-ad-close:hover i {
    color: #fff !important;
}

.sticky-ad-close i {
    color: #666;
    font-size: 14px;
}

.ad-content-wrapper {
    text-align: center;
    padding: 8px;
    background: #fafbfc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8eaed;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.ad-label-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 8px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e1e8ed;
    z-index: 5;
}

/* Desktop ad - hide on mobile */
.ad-content-wrapper > .d-none.d-md-block {
    display: block !important;
}

.ad-content-wrapper > .d-block.d-md-none {
    display: none !important;
}

/* MOBILE - CRITICAL FIX */
@media (max-width: 768px) {
    .sticky-bottom-ad {
        padding: 8px 5px;
    }

    .sticky-ad-wrapper {
        padding: 0;
        width: 100%;
    }

    .ad-content-wrapper {
        padding: 6px 4px;
        max-width: 100%;
        min-height: 60px;
    }

    /* FORCE show mobile ad, hide desktop */
    .ad-content-wrapper > .d-none.d-md-block {
        display: none !important;
    }

    .ad-content-wrapper > .d-block.d-md-none {
        display: block !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    /* Mobile ad sizing */
    .ad-content-wrapper ins.adsbygoogle {
        display: inline-block !important;
        width: 320px !important;
        height: 50px !important;
        max-width: 100% !important;
    }

    .sticky-ad-close {
        width: 24px;
        height: 24px;
        top: -8px;
        right: 3px;
    }

    .sticky-ad-close i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sticky-bottom-ad {
        padding: 6px 3px;
    }

    .ad-content-wrapper {
        padding: 4px 2px;
        min-height: 55px;
    }

    .ad-content-wrapper ins.adsbygoogle {
        width: 300px !important;
        height: 50px !important;
    }
}

@media (max-width: 360px) {
    .sticky-bottom-ad {
        padding: 5px 2px;
    }

    .ad-content-wrapper {
        padding: 3px 1px;
        min-height: 50px;
    }

    .ad-content-wrapper ins.adsbygoogle {
        width: 280px !important;
        height: 50px !important;
    }

    .sticky-ad-close {
        width: 22px;
        height: 22px;
        top: -7px;
        right: 2px;
    }
}

/* Body padding to prevent content overlap */
body.ad-visible {
    padding-bottom: 90px !important;
}

@media (max-width: 768px) {
    body.ad-visible {
        padding-bottom: 70px !important;
    }
}

@media (max-width: 480px) {
    body.ad-visible {
        padding-bottom: 65px !important;
    }
}

/* Smooth close animation */
.sticky-bottom-ad.closing {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}
