/* =========================================================
   Canary Client Dashboard Tabs
   ========================================================= */

.canary-dashboard-tabs-frame {
    margin-top: 28px;
    margin-bottom: 28px;
}

.canary-tab-card {
    padding: 0;
    overflow: hidden;
}

.canary-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    border-bottom: 1px solid var(--border-faint);
    background: rgba(255, 255, 255, 0.025);
}

.canary-tab {
    border: 1px solid var(--border-faint);
    background: var(--surface-inner);
    color: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.canary-tab:hover {
    color: white;
    border-color: rgba(246, 213, 58, 0.5);
    box-shadow: 0 0 0 2px rgba(246, 213, 58, 0.12);
}

.canary-tab.active {
    color: #111;
    background: var(--canary-yellow);
    border-color: var(--canary-yellow);
    box-shadow: 0 0 22px rgba(246, 213, 58, 0.22);
}

.canary-tab-content {
    padding: 26px;
}

.canary-tab-panel {
    display: none;
}

.canary-tab-panel.active {
    display: block;
}

@media (max-width: 768px) {
    .canary-tabs {
        flex-direction: column;
    }

    .canary-tab {
        width: 100%;
        text-align: left;
    }
}

.canary-file-upload {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.canary-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.canary-file-name {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}


/* =========================================================
   Batch DOI Progress
   ========================================================= */

.batch-progress {
    min-width: 140px;
}

.batch-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.batch-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.9);
    transition: width 0.25s ease;
}

.batch-progress-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.8;
}


/* =========================================================
   Batch DOI Job Status Chips
   These describe the batch job lifecycle.
   ========================================================= */

.batch-status-uploaded,
.batch-status-ingesting,
.batch-status-queued,
.batch-status-running,
.batch-status-paused {
    border-color: rgba(250, 204, 21, 0.55);
    background: rgba(250, 204, 21, 0.08);
    color: #fef08a;
}

.batch-status-completed {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.08);
    color: #bbf7d0;
}

.batch-status-completed_with_errors,
.batch-status-failed,
.batch-status-cancelled {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
}


/* =========================================================
   Batch DOI Result Chips
   These describe DOI/site search outcomes.
   Important: found = danger, because asset was found on a piracy site.
   ========================================================= */

.batch-result-found {
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.batch-result-not_found {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.08);
    color: #bbf7d0;
}

.batch-result-inconclusive,
.batch-result-pending,
.batch-result-running {
    border-color: rgba(250, 204, 21, 0.55);
    background: rgba(250, 204, 21, 0.08);
    color: #fef08a;
}

.batch-result-rejected {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
}

.batch-result-error {
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}


/* =========================================================
   Batch DOI Actions
   ========================================================= */

.batch-job-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.batch-job-actions .canary-icon-action {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

.canary-table th:last-child,
.canary-table td:last-child {
    white-space: nowrap;
    min-width: 170px;
}
.canary-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.08);
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        opacity 0.15s ease;
}

.canary-icon-action:hover {
    background: rgba(250, 204, 21, 0.16);
    border-color: rgba(250, 204, 21, 0.65);
    transform: translateY(-1px);
}

.canary-icon-action:focus {
    outline: 2px solid rgba(250, 204, 21, 0.65);
    outline-offset: 2px;
}

.canary-icon-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.batch-job-action-danger {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
}

.batch-job-action-danger:hover {
    border-color: rgba(239, 68, 68, 0.75);
    background: rgba(239, 68, 68, 0.16);
}


/* =========================================================
   Rejected DOI List
   ========================================================= */

.canary-rejected-doi-scroll {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
}

.canary-rejected-doi-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(181, 181, 181, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.canary-rejected-doi-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.canary-rejected-doi-value {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
    word-break: break-word;
}

.canary-rejected-doi-reason {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .canary-rejected-doi-row {
        grid-template-columns: 1fr;
    }

    .canary-rejected-doi-reason {
        justify-self: start;
    }
}


/* =========================================================
   Search Summary List
   ========================================================= */

.canary-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.canary-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(181, 181, 181, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.canary-summary-site {
    min-width: 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.canary-summary-status {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .canary-summary-row {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }

    .canary-summary-status {
        justify-self: start;
    }
}
