/* ============================================
   AI TOOLS SHORTCUTS - platform page styling
   ============================================ */

.ais-platform-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.ais-platform-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(0,168,120,0.05));
}
.ais-platform-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark, #0F172A);
    margin-bottom: 0.35rem;
    line-height: 1.2;
}
.ais-platform-desc {
    color: var(--text-muted, #64748B);
    font-size: 1rem;
    line-height: 1.5;
}

/* Search + live dropdown */
.ais-search-wrap {
    position: relative;
    margin-bottom: 0;
    flex: 1;
}
.ais-filter-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.ais-search-submit-btn {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary, #00A878);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ais-filter-summary {
    color: var(--text-muted, #64748B);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.ais-filter-summary a {
    color: var(--primary, #00A878);
    font-weight: 700;
}
.ais-search-input {
    width: 100%;
    padding: 0.95rem 3rem 0.95rem 1.25rem;
    border: 1.5px solid var(--border, #E2E8E4);
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-card, #fff);
    box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(0,168,120,0.05));
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ais-search-input:focus {
    outline: none;
    border-color: var(--primary, #00A878);
    box-shadow: 0 0 0 4px rgba(0, 168, 120, 0.12);
}
.ais-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E2E8E4);
    border-radius: 16px;
    box-shadow: var(--shadow-md, 0 10px 40px -10px rgba(0,168,120,0.08));
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem;
}
.ais-search-dropdown.is-open {
    display: block;
}
.ais-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.ais-dropdown-item:hover {
    background: var(--bg-surface, #F1F5F2);
}
.ais-dropdown-item code {
    font-weight: 700;
    color: var(--primary-dark, #065F46);
    font-size: 0.9rem;
}
.ais-dropdown-item span {
    font-size: 0.8rem;
    color: var(--text-muted, #64748B);
}
.ais-dropdown-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted, #64748B);
    font-size: 0.9rem;
}

/* Shortcut cards grid */
.ais-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.ais-shortcut-card {
    position: relative;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E2E8E4);
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(0,168,120,0.05));
    transition: box-shadow 0.2s, border-color 0.2s;
}
.ais-shortcut-card.is-highlighted {
    border-color: var(--primary, #00A878);
    box-shadow: 0 0 0 3px rgba(0, 168, 120, 0.15);
}
.ais-like-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-surface, #F1F5F2);
    border: none;
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    color: var(--text-muted, #64748B);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}
.ais-like-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
}
.ais-like-btn.is-liked {
    background: #FEE2E2;
    color: #DC2626;
}
.ais-shortcut-refcode {
    display: inline-block;
    font-size: 0.7rem;
    font-family: monospace;
    color: var(--text-muted, #64748B);
    background: var(--bg-surface, #F1F5F2);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}
.ais-shortcut-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.ais-shortcut-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark, #065F46);
    background: var(--primary-light, #D1FAE5);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    word-break: break-all;
}
.ais-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-surface, #F1F5F2);
    color: var(--text-dark, #0F172A);
    border: 1px solid var(--border, #E2E8E4);
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.ais-copy-btn:hover {
    border-color: var(--primary, #00A878);
    color: var(--primary, #00A878);
}
.ais-copy-btn.is-copied {
    background: var(--primary, #00A878);
    color: #fff;
    border-color: var(--primary, #00A878);
}
.ais-shortcut-desc {
    color: var(--text-muted, #64748B);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Example result image - small thumbnail on the card, opens full size
   in a lightbox on click. */
.ais-example-thumb-btn {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-bottom: 0.85rem;
    background: var(--bg-surface, #F1F5F2);
}
.ais-example-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.ais-example-thumb-btn:hover .ais-example-thumb {
    transform: scale(1.05);
}
.ais-example-thumb-zoom {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Lightbox - full-size, responsive on every device. Hidden by default
   via display:none, toggled to flex via .is-open (not inline styles),
   so this works reliably regardless of viewport size. */
.ais-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.92);
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}
.ais-lightbox.is-open {
    display: flex;
}
.ais-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.5);
}
.ais-lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ais-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}
@media (max-width: 600px) {
    .ais-lightbox {
        padding: 1rem 0.75rem;
    }
    .ais-lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 600px) {
    .ais-platform-header {
        flex-direction: column;
        text-align: center;
    }
    .ais-shortcut-grid {
        grid-template-columns: 1fr;
    }
}

/* Full sidebar now shows on all screen sizes, including mobile -
   overrides .prompt-sidebar's own display:none base rule (defined in
   style.css, shared with prompt.php) since this file loads after that
   one with equal selector specificity. Only applies here, via this
   dedicated class - prompt.php's own sidebar is untouched and stays
   desktop-only, since it never has this class. */
.ais-mobile-visible {
    display: block;
}

/* Other AI Tools - full-width responsive card section below the main
   sidebar grid, reusing the exact same card styling as the hub page. */
.ais-other-tools-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border, #E2E8E4);
}
.ais-other-tools-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark, #0F172A);
    margin-bottom: 1.25rem;
}

/* Hub page - platform cards */
.ais-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.ais-platform-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E2E8E4);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(0,168,120,0.05));
    transition: transform 0.2s, box-shadow 0.2s;
    color: inherit;
    text-decoration: none;
}
.ais-platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md, 0 10px 40px -10px rgba(0,168,120,0.08));
}
.ais-platform-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}
.ais-platform-card-icon-empty {
    background: var(--primary-light, #D1FAE5);
}
.ais-platform-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark, #0F172A);
    margin-bottom: 0.35rem;
}
.ais-platform-card-body p {
    font-size: 0.88rem;
    color: var(--text-muted, #64748B);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.ais-platform-card-count {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-dark, #065F46);
    background: var(--primary-light, #D1FAE5);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

/* Category filter dropdown */
.ais-category-select-wrap {
    margin-bottom: 1.25rem;
    max-width: 280px;
    flex: 0 0 auto;
    width: 100%;
}
.ais-category-select-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #64748B);
    margin-bottom: 0.4rem;
}
.ais-category-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1.5px solid var(--border, #E2E8E4);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-dark, #0F172A);
    background: var(--bg-card, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ais-category-select:focus {
    outline: none;
    border-color: var(--primary, #00A878);
    box-shadow: 0 0 0 4px rgba(0, 168, 120, 0.12);
}

@media (max-width: 640px) {
    .ais-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .ais-category-select-wrap {
        max-width: none;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    .ais-search-wrap {
        width: 100%;
    }
}

/* Pagination */
.ais-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
}
.ais-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 0.6rem;
    border: 1.5px solid var(--border, #E2E8E4);
    background: var(--bg-card, #fff);
    color: var(--text-dark, #0F172A);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}
.ais-page-btn:hover {
    border-color: var(--primary, #00A878);
    color: var(--primary, #00A878);
}
.ais-page-btn.is-active {
    background: var(--primary, #00A878);
    color: #fff;
    border-color: var(--primary, #00A878);
}

/* Empty state when a category/search combination has no matches */
.ais-empty-filtered {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted, #64748B);
}
