/* cc-app-images custom styles */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #111827;
    border-radius: 0.375rem;
}

.table-thumb {
    width: 80px;
    height: 60px;
    object-fit: contain;
    background: #111827;
    border-radius: 0.25rem;
}

.tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: #374151;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #d1d5db;
}

.tag:hover {
    background-color: #4b5563;
}

.copy-btn {
    cursor: pointer;
    line-height: 1;
}

.copy-btn.copied {
    color: #34d399 !important;
    background: #064e3b !important;
}

.url-builder {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 0.5rem;
    padding: 1rem;
}

.url-builder label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.url-builder input[type="number"],
.url-builder input[type="text"],
.url-builder select {
    padding: 0.25rem 0.5rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #f3f4f6;
}

.url-builder input[type="number"] {
    width: 6rem;
}

tr.htmx-swapping,
div.htmx-swapping {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.confirm-dialog {
    background: #1f2937;
    color: #f3f4f6;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 24rem;
}

.confirm-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.confirm-dialog p {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.confirm-btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    color: white;
}

.confirm-btn-cancel {
    background: #4b5563;
}

.confirm-btn-cancel:hover {
    background: #6b7280;
}

.confirm-btn-delete {
    background: #dc2626;
}

.confirm-btn-delete:hover {
    background: #b91c1c;
}

.cache-progress-bar {
    width: 100%;
    height: 1.25rem;
    border-radius: 0.375rem;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: #111827;
    border: 1px solid #374151;
}

.cache-progress-bar::-webkit-progress-bar {
    background: #111827;
    border-radius: 0.375rem;
}

.cache-progress-bar::-webkit-progress-value {
    background: #2563eb;
    border-radius: 0.375rem;
    transition: width 0.3s ease;
}

.cache-progress-bar::-moz-progress-bar {
    background: #2563eb;
    border-radius: 0.375rem;
}

.tag-dropdown li:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.tag-dropdown li:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

.url-builder .ub-preview {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: #d1d5db;
    background: #1f2937;
    padding: 0.375rem 0.5rem;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    word-break: break-all;
}
