/* Babiato PDF Tools — Frontend Styles */
.btf-pdf-workspace { font-family: inherit; }

/* Upload zone */
.btf-upload-zone {
    border: 2px dashed var(--color-border, #e2e8f0);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--color-bg-secondary, #f8fafc);
    margin-bottom: 1rem;
    position: relative;
}
.btf-upload-zone:hover,
.btf-upload-zone.drag-over {
    border-color: #10b981;
    background: rgba(16,185,129,.05);
}
.btf-upload-zone input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.btf-upload-icon { font-size: 2.2rem; margin-bottom: .5rem; display: block; }
.btf-upload-label {
    font-size: .95rem;
    color: var(--color-text-muted, #64748b);
    line-height: 1.5;
}
.btf-upload-label strong { color: #10b981; }
.btf-file-list {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
}
.btf-file-chip {
    background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3);
    border-radius: 20px;
    padding: .2rem .75rem;
    font-size: .8rem;
    color: #059669;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Options row */
.btf-pdf-opts {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}
.btf-pdf-opts label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-text, #1e293b);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.btf-pdf-opts select,
.btf-pdf-opts input[type="text"],
.btf-pdf-opts input[type="password"] {
    padding: .35rem .7rem;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 6px;
    background: var(--color-bg, #fff);
    color: var(--color-text, #1e293b);
    font-size: .875rem;
    font-family: inherit;
}

/* Submit button */
.btf-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 2rem;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btf-pdf-btn:hover   { background: #059669; }
.btf-pdf-btn:disabled { background: #94a3b8; cursor: not-allowed; }

/* Spinner */
.btf-spin {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btf-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes btf-spin { to { transform: rotate(360deg); } }

/* Progress bar */
.btf-progress-wrap {
    background: var(--color-bg-secondary, #f0f9ff);
    border: 1.5px solid #bae6fd;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-top: .75rem;
    display: none;
}
.btf-progress-bar-bg {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: .5rem;
}
.btf-progress-bar {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    width: 0%;
    transition: width .3s;
    animation: btf-progress-pulse 1.5s ease-in-out infinite;
}
@keyframes btf-progress-pulse {
    0%,100% { opacity:1; } 50% { opacity:.6; }
}

/* Error */
.btf-pdf-err {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    padding: .75rem 1rem;
    font-size: .9rem;
    margin-top: .75rem;
    display: none;
}

/* Result panel */
.btf-pdf-result {
    background: var(--color-bg-secondary, #f0fdf4);
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    display: none;
    text-align: center;
}
.btf-pdf-result h3 {
    margin: 0 0 .5rem;
    color: #15803d;
    font-size: 1.1rem;
}
.btf-result-meta {
    font-size: .85rem;
    color: var(--color-text-muted, #64748b);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.btf-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    background: #15803d;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    transition: background .2s;
}
.btf-dl-btn:hover { background: #166534; color: #fff; }

.btf-sm-btn {
    padding: .35rem .8rem;
    background: transparent;
    border: 1.5px solid var(--color-border, #e2e8f0);
    border-radius: 6px;
    font-size: .8rem;
    cursor: pointer;
    font-family: inherit;
    margin-top: .75rem;
    margin-left: .5rem;
}
.btf-sm-btn:hover { background: var(--color-bg, #fff); }
