@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TD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3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Custom styles for theme toggle */
html[data-bs-theme="dark"] {
    color-scheme: dark;
}

html[data-bs-theme="light"] {
    color-scheme: light;
}

/* Ensure body background changes with theme */
html[data-bs-theme="dark"] body {
    background-color: #151521 !important;
    color: #c2c2d9 !important;
}

html[data-bs-theme="light"] body {
    background-color: #f2f7ff !important;
    color: #607080 !important;
}

/* Ensure cards change with theme */
html[data-bs-theme="dark"] .card {
    background-color: #1b1b29 !important;
    border-color: #35354f !important;
}

html[data-bs-theme="light"] .card {
    background-color: #fff !important;
    border-color: rgba(0, 0, 0, .125) !important;
}

/* Ensure navbar changes with theme */
html[data-bs-theme="dark"] .navbar {
    background-color: #1b1b29 !important;
}

html[data-bs-theme="light"] .navbar {
    background-color: #fff !important;
}

/* Ensure sidebar changes with theme */
html[data-bs-theme="dark"] .sidebar {
    background-color: #1b1b29 !important;
}

html[data-bs-theme="light"] .sidebar {
    background-color: #fff !important;
}

/* Debug styles to see theme changes */
.theme-debug {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
}

.serie-details-panel {
    background-color: #1b1b29; /* Dark background similar to cards */
    color: #c2c2d9;            /* Light text color for contrast */
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* ===== ESTILOS DE NOTIFICACIONES GLOBALES ===== */
/* Estilos para las notificaciones modernas */
.notification-container {
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    min-width: 350px;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: notification-slide-in 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 12px;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
}

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    line-height: 1.4;
    color: #6c757d;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #6c757d;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #495057;
}

/* Variantes de notificación */
.notification-success {
    border-left: 4px solid #10b981;
}

.notification-success .notification-icon {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.notification-success .notification-title {
    color: #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-error .notification-icon {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.notification-error .notification-title {
    color: #ef4444;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-warning .notification-icon {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.notification-warning .notification-title {
    color: #f59e0b;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-info .notification-icon {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.notification-info .notification-title {
    color: #3b82f6;
}

/* Animaciones */
@keyframes notification-slide-in {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes notification-slide-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.notification-toast.hiding {
    animation: notification-slide-out 0.3s ease-in forwards;
}

/* Responsive */
@media (max-width: 576px) {
    .notification-toast {
        min-width: 300px;
        max-width: calc(100vw - 40px);
    }
    
    .notification-content {
        padding: 14px 16px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Soporte para tema oscuro */
html[data-bs-theme="dark"] .notification-toast {
    background: #1b1b29;
    border-color: #35354f;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html[data-bs-theme="dark"] .notification-message {
    color: #c2c2d9;
}

html[data-bs-theme="dark"] .notification-close {
    color: #c2c2d9;
}

html[data-bs-theme="dark"] .notification-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== ESTILOS DE GALERÍA DE IMÁGENES ===== */
.gallery-container {
    padding: 10px 0;
    text-align: center; /* Alinea las imágenes al centro */
}

.gallery-item {
    display: inline-block;
    vertical-align: top;
    width: calc(10% - 10px); /* 10 imágenes por fila con un espaciado */
    margin: 5px;
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.5);
    z-index: 10;
}

.gallery-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    display: block;
}

/* Eliminar estilos no necesarios o redundantes */
.sello-group, .image-hover-highlight {
    /* Estos ya no son necesarios con la nueva estructura de grid */
}

/* ===== ESTILOS DE AYUDA PARA TABLAS ANIDADAS ===== */
/* Evita que la fila de detalles de la tabla herede el color de fondo al pasar el cursor */
.table-hover > tbody > tr.details-row:hover > * {
    background-color: transparent;
}

/* Asegura que la celda de detalles no tenga un fondo propio para que se vea el del card */
.details-row > td {
    background-color: transparent !important;
}

/* Para la tabla de detalles de sellos, asegura que el texto sea legible en tema oscuro */
html[data-bs-theme="dark"] .table-details tbody tr td {
    color: #c2c2d9; /* Color de texto claro del tema oscuro */
}

/* Estilo para la fila resaltada por el hover de la imagen */
.row-hover-highlight > td {
    background-color: rgba(59, 130, 246, 0.2) !important; /* Un azul semitransparente */
}
