/* SkyTranslate Bulk Translate for TranslatePress Styles */

#skytbt-fetch-strings {
    background: #3858e9;
    color: #fff;
    border: 1px solid #3858e9;
    padding: 0 16px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 32px;
    line-height: 30px;
    vertical-align: middle;
    transition: all 0.2s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#skytbt-fetch-strings:hover {
    background: #1d3aaf;
    border-color: #1d3aaf;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#skytbt-fetch-strings:active {
    transform: translateY(1px);
}

#skytbt-fetch-strings:disabled {
    background: #c3c4c7;
    border-color: #c3c4c7;
    color: #f0f0f1;
    cursor: not-allowed;
}

/* Results Panel */
.skytbt-string-fetcher-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.skytbt-string-fetcher-panel.active {
    display: flex;
}

.fetcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f0f0f1;
    border-bottom: 1px solid #c3c4c7;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fetcher-ai-translate {
    margin: 0 !important;
    background: #135e20 !important;
    border-color: #135e20 !important;
    color: #fff !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1) !important;
    font-size: 13px !important;
    padding: 0 12px !important;
    height: 30px !important;
    line-height: 28px !important;
    transition: all 0.2s ease !important;
}

.fetcher-ai-translate:hover {
    background: #10501c !important;
    border-color: #10501c !important;
}

.fetcher-ai-translate:disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.fetcher-progress {
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
}

.progress-bar {
    height: 6px;
    background: #135e20;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s ease;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 12px;
    color: #646970;
    text-align: center;
}

.fetcher-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
}

.string-count {
    font-size: 13px;
    color: #3c434a;
    font-weight: 500;
}

.fetcher-search {
    padding: 12px 20px;
    border-bottom: 1px solid #c3c4c7;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
}

.search-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.fetcher-content {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.string-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.string-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
}

.string-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.5;
}

.fetcher-loading {
    padding: 40px;
    text-align: center;
    color: #646970;
}

.fetcher-loading .spinner {
    float: none;
    margin: 0 auto 12px;
}

.string-item.error,
.string-item.empty {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 40px;
}

.string-item.error {
    color: #d63638;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .skytbt-string-fetcher-panel {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
}

/* -------------------------------------------------------
 * Inline single-string AI Translate button
 * Appears in the footer of each target-language row
 * inside the TranslatePress sidebar editor.
 * ------------------------------------------------------- */
.skytbt-inline-translate {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #3858e9;
    color: #fff;
    border: 1px solid #3858e9;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.6;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    margin-left: 4px;
    white-space: nowrap;
}

.skytbt-inline-translate:hover {
    background: #1d3aaf;
    border-color: #1d3aaf;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.skytbt-inline-translate:active {
    transform: translateY(1px);
}

.skytbt-inline-translate:disabled {
    background: #8f9fc8;
    border-color: #8f9fc8;
    cursor: not-allowed;
    box-shadow: none;
}

