/* AI Image Describer */

.aid-drop-zone {
    display: block;
    border: 2px dashed rgba(37, 99, 235, 0.35);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    background: rgba(37, 99, 235, 0.04);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 0;
}

.aid-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aid-choose-btn {
    pointer-events: none;
}

.aid-drop-zone:hover,
.aid-drop-zone.is-dragover {
    border-color: rgba(37, 99, 235, 0.65);
    background: rgba(37, 99, 235, 0.08);
}

.aid-drop-icon {
    font-size: 2.5rem;
    color: #2563eb;
}

.aid-preview-panel {
    margin-top: 0;
}

.aid-preview-frame {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bs-secondary-bg, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    max-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aid-preview-img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.aid-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.aid-file-name {
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-all;
}

.aid-result-textarea {
    font-size: 0.95rem;
    resize: vertical;
    min-height: 4rem;
}

.aid-results-empty {
    min-height: 280px;
}

.aid-work-row {
    align-items: stretch;
}

/* 下方說明區 — 與 image-tool 等工具共用 app.css，僅補 FAQ 手風琴 */
.aid-faq-list .faq-a {
    display: none;
    padding-top: 12px;
}

.aid-faq-list .faq-item.is-open .faq-a {
    display: block;
}

.aid-faq-list .faq-item .faq-q i {
    transition: transform 0.2s ease;
}

.aid-faq-list .faq-item.is-open .faq-q i {
    transform: rotate(180deg);
}

/* Loading bridge page（與 ai-keyword-explorer .kn-bridge-* 對齊） */

.aid-bridge-page {
    --aid-bridge-bg: #0a0e1a;
    --aid-bridge-card-bg: rgba(15, 22, 48, 0.95);
    --aid-bridge-card-border: rgba(80, 140, 255, 0.2);
    background: var(--aid-bridge-bg);
}

[data-theme-palette="light"] .aid-bridge-page,
:root:not([data-theme-palette]) .aid-bridge-page {
    --aid-bridge-bg: #f8fafc;
    --aid-bridge-card-bg: rgba(255, 255, 255, 0.96);
    --aid-bridge-card-border: rgba(37, 99, 235, 0.2);
}

[data-theme-palette="sunrise"] .aid-bridge-page {
    --aid-bridge-bg: #fff7ed;
    --aid-bridge-card-bg: rgba(255, 250, 242, 0.96);
    --aid-bridge-card-border: rgba(234, 88, 12, 0.2);
}

[data-theme-palette="mint"] .aid-bridge-page {
    --aid-bridge-bg: #f2fbf7;
    --aid-bridge-card-bg: rgba(252, 255, 253, 0.96);
    --aid-bridge-card-border: rgba(15, 118, 110, 0.2);
}

[data-theme-palette="sepia"] .aid-bridge-page {
    --aid-bridge-bg: #f7f1e5;
    --aid-bridge-card-bg: rgba(255, 250, 240, 0.96);
    --aid-bridge-card-border: rgba(139, 94, 52, 0.2);
}

[data-theme-palette="dusk"] .aid-bridge-page {
    --aid-bridge-bg: #111827;
    --aid-bridge-card-bg: rgba(31, 35, 64, 0.95);
    --aid-bridge-card-border: rgba(196, 181, 253, 0.2);
}

.aid-bridge-shell {
    width: 100%;
}

.aid-bridge-center {
    background: var(--aid-bridge-card-bg) !important;
    border: 1px solid var(--aid-bridge-card-border) !important;
}

.aid-bridge-ad {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aid-bridge-ad .adsbygoogle {
    display: block;
    width: 100%;
    min-width: 250px;
}

.aid-bridge-page-inner {
    background: var(--aid-bridge-bg, #f8fafc);
}

body.aid-bridge-page #bv-app {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

main.aid-bridge-page-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

main.aid-bridge-page-inner .aid-bridge-shell {
    width: 100%;
}

.tool-top-ad.aid-bridge-ad-wrap {
    margin-bottom: 0;
}

.aid-loading-spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

.aid-spinner-ring {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(80, 140, 255, 0.15);
    border-top-color: #508cff;
    border-radius: 50%;
    animation: aid-spin 0.85s linear infinite;
}

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

.aid-loading-icon {
    font-size: 2.5rem;
}

.aid-loading-summary {
    color: rgba(80, 140, 255, 0.8);
    background: rgba(80, 140, 255, 0.08);
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
}

@media (max-width: 767.98px) {
    .aid-drop-zone {
        padding: 1.5rem 1rem;
    }

    .aid-preview-frame {
        max-height: 220px;
    }

    .aid-preview-img {
        max-height: 220px;
    }
}
