/* Custom styles for Store Manager */

/* Reduce gap between header and main content */
header.container {
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

main.container {
    margin-top: 0;
    padding-top: 0.5rem;
}

.error {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    background-color: #dc3545;
    color: white;
}

.success {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    background-color: #28a745;
    color: white;
}

/* Agent row hover effect */
.agent-row:hover {
    background-color: var(--card-background-color);
    transition: background-color 0.2s ease;
}

/* Dialog styling */
dialog {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.5);
    padding: 0;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Image block styling */
.image-block {
    margin-bottom: 2rem;
}

.image-block header {
    margin-bottom: 1rem;
}

.image-block header h4 {
    margin-bottom: 0;
}

.image-preview {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--card-background-color);
    border-radius: 0.5rem;
    text-align: center;
}

.image-preview img {
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.htmx-indicator {
    display: none;
    margin-left: 0.5rem;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

nav ul li.active a {
    background-color: var(--primary);
}

.file-preview {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.5rem;
    background-color: var(--card-background-color);
    border-radius: 0.25rem;
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 0.25rem;
}

table img {
    max-width: 50px;
    max-height: 50px;
}

/* Make buttons more compact in tables */
table button,
table a[role="button"] {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.htmx-indicator::after {
    content: "⏳";
    animation: spin 1s linear infinite;
}
