﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

a {
  color: #0077cc;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  /*bottom: 0;*/
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}
body {
    background-image: url('/images/siena-background.jpg');
    background-size: cover;
    background-attachment: fixed;
    color: #333;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

    .btn-primary:hover {
        background-color: #0056b3;
        border-color: #004085;
    }

.jumbotron {
    background-image: url('../images/background.jpg');
    background-size: cover;
    color: #fff;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: .3rem;
}

    .jumbotron .btn {
        background-color: #f8f9fa;
        color: #007bff;
    }

.marketing .col-lg-4 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.marketing img {
    margin-bottom: 1rem;
}

/*footer {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, .1);
    position: relative;
    width: 100%;
    bottom: 0;
}*/

.card-form {
    background-color: #fefefe;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.form-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 30px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 6px;
}

.form-group {
    margin-bottom: 24px;
}

    .form-group label {
        font-weight: 500;
    }

.form-control, select {
    border-radius: 8px;
    padding: 10px;
    font-size: 0.95rem;
}

textarea.form-control {
    resize: vertical;
}

.btn-primary {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-secondary {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
    margin-left: 10px;
}
.container {
    margin-bottom: 5rem; /* Ensures there's space for the footer */
}
body {
    background-color: #f8f9fa; /* grigio chiaro bootstrap-like */
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Spazio per la navbar fissa */
    font-family: 'Segoe UI', sans-serif;
}

.page-container {
    max-width: 1600px;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}
.giraffa-red {
    background-color: #C8102E; /* Rosso brillante */
    color: white;
}

.giraffa-white {
    background-color: #FFFFFF; /* Bianco */
    color: #C8102E;
}

.giraffa-border {
    border: 2px solid #C8102E;
    border-radius: 8px;
}
.giraffa-login-header {
    background-color: #C8102E;
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    text-align: center;
}

.giraffa-login-box {
    border: 2px solid #C8102E;
    border-radius: 0.5rem;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.giraffa-btn {
    background-color: #C8102E;
    border: none;
    color: white;
}

    .giraffa-btn:hover {
        background-color: #a50e26;
        color: white;
    }
.dashboard-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .dashboard-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .dashboard-card i {
        font-size: 2.5rem;
        color: #b8172f; /* rosso Giraffa */
    }

.dashboard-title {
    color: #7a1c26; /* tono più caldo del rosso */
    font-weight: 600;
    margin-top: 1rem;
}
.dashboard-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .dashboard-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .dashboard-card i {
        font-size: 2.5rem;
        color: #b8172f; /* rosso Giraffa */
    }

.dashboard-title {
    color: #7a1c26;
    font-weight: 600;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.badge-counter {
    background-color: #b8172f;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 8px;
}
div.dtsb-searchBuilder {
    margin-bottom: 1rem;
}

.readonly-form input,
.readonly-form select,
.readonly-form textarea,
.readonly-form button {
    pointer-events: none;
    background-color: #f9f9f9;
    color: #6c757d;
    cursor: default;
    border-color: #ced4da;
}

    .readonly-form input[type="hidden"],
    .readonly-form input[type="submit"],
    .readonly-form button[type="submit"] {
        display: none;
    }

/* Navbar Icons Styling */
.navbar .nav-link i {
    color: #6c757d;
    transition: color 0.2s ease-in-out;
    font-size: 0.95rem;
}

.navbar .nav-link:hover i {
    color: #b8172f; /* colore rosso Giraffa */
}

.dropdown-item i {
    color: #6c757d;
    transition: color 0.2s ease-in-out;
    width: 16px;
    text-align: center;
}

.dropdown-item:hover i {
    color: #b8172f; /* colore rosso Giraffa */
}

.navbar-brand i {
    color: #b8172f; /* colore rosso Giraffa */
    font-size: 1.1rem;
}

/* User dropdown improvements */
.dropdown-menu-end {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 0;
    border-radius: 8px;
}

.dropdown-item {
    border-radius: 4px;
    margin: 2px 4px;
    transition: all 0.2s ease-in-out;
}

.dropdown-item:hover {
    background-color: rgba(184, 23, 47, 0.1); /* colore rosso Giraffa con opacità */
}

/* Navbar brand improvements */
.navbar-brand {
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.navbar-brand:hover {
    color: #b8172f !important;
}

.navbar-brand:hover i {
    transform: rotate(10deg);
    transition: transform 0.2s ease-in-out;
}

/* ===== SPINNER DI CARICAMENTO PAGINA ===== */

/* Overlay che copre l'intera finestra */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none; /* Nascosto per default */
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-out;
}

/* Dark mode support per l'overlay */
[data-theme="dark"] .page-loading-overlay {
    background-color: rgba(33, 37, 41, 0.9);
}

/* Container dello spinner */
.page-loading-spinner {
    text-align: center;
    color: #6c757d;
}

/* Spinner circolare animato */
.page-loading-spinner .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #b8172f; /* Colore rosso Giraffa */
    border-radius: 50%;
    animation: page-loading-spin 1s linear infinite;
    margin: 0 auto 16px;
}

/* Dark mode support per lo spinner */
[data-theme="dark"] .page-loading-spinner .spinner {
    border: 4px solid #495057;
    border-top: 4px solid #b8172f;
}

/* Animazione rotazione */
@keyframes page-loading-spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Testo del loading */
.page-loading-spinner .loading-text {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

/* Classe per il body durante il caricamento */
body.loading {
    overflow: hidden; /* Previene lo scroll durante il caricamento */
}

/* Animazione fade-out per nascondere lo spinner */
.page-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Responsive: spinner più piccolo su mobile */
@media (max-width: 576px) {
    .page-loading-spinner .spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
        margin-bottom: 12px;
    }

    .page-loading-spinner .loading-text {
        font-size: 13px;
    }
}

/* ===== STILI PER CARTELLE ARCHIVISTICHE ===== */

/* Cartelle archivistiche evidenziate in rosso nell'albero */
.jstree-default .archival-folder-node {
    color: #dc3545 !important;
    font-weight: 600;
}

.jstree-default .archival-folder-node:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Icona cartella rossa per cartelle archivistiche */
.jstree-default .archival-folder-node .jstree-icon {
    color: #dc3545 !important;
}

/* Badge cartella archivistica */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Stili per modale parametri archivistici */
#archivalParametersModal .modal-xl {
    max-width: 1200px;
}

#archivalParametersModal .card-header.bg-info {
    background-color: #0dcaf0 !important;
}

#archivalParametersModal .form-control,
#archivalParametersModal .form-select {
    font-size: 0.95rem;
}

/* Dark mode support per cartelle archivistiche */
[data-theme="dark"] .jstree-default .archival-folder-node {
    color: #ff6b6b !important;
}

[data-theme="dark"] .jstree-default .archival-folder-node:hover {
    background-color: rgba(255, 107, 107, 0.15) !important;
}

/* ===== ARCHIVIO STORICO - STILE CLASSICO ===== */

/* Variabili di colore per Archivio Storico */
:root {
    /* Palette Seppia/Caldi */
    --historical-bg-main: #f9f6f0;           /* Tono pergamena chiaro */
    --historical-bg-card: #fefdfb;           /* Bianco caldo */
    --historical-border: #d4c5a9;            /* Beige antico */
    --historical-text-title: #5a4a3a;        /* Marrone scuro */
    --historical-text-body: #6b5d4f;         /* Marrone medio */
    --historical-accent-gold: #8b6914;       /* Oro antico */
    --historical-accent-red: #b8172f;        /* Rosso Giraffa (secondario) */
    --historical-shadow: 0 3px 8px rgba(90, 74, 58, 0.12);
    --historical-shadow-hover: 0 6px 16px rgba(90, 74, 58, 0.18);
}

/* Dark mode - palette adattata */
[data-theme="dark"] {
    --historical-bg-main: #1a1612;           /* Marrone scurissimo */
    --historical-bg-card: #251f1a;           /* Marrone scuro */
    --historical-border: #3d342a;            /* Beige scuro */
    --historical-text-title: #e8dcc8;        /* Beige chiaro */
    --historical-text-body: #c9b8a0;         /* Beige medio */
    --historical-accent-gold: #c9a354;       /* Oro chiaro */
    --historical-accent-red: #d63851;        /* Rosso Giraffa brillante */
    --historical-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    --historical-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* Container principale Archivio Storico */
.historical-archive-page {
    background-color: var(--historical-bg-main);
    padding: 2rem;
    border-radius: 16px;
    /* Texture carta leggera - inline data URI SVG */
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.03" /></svg>');
    box-shadow: inset 0 0 20px rgba(90, 74, 58, 0.05);
}

/* Header Archivio Storico */
.historical-archive-header {
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--historical-border);
    margin-bottom: 3rem !important;
}

.historical-archive-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--historical-text-title);
    letter-spacing: 0.5px;
}

.historical-archive-subtitle {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    color: var(--historical-text-body);
    line-height: 1.6;
}

/* Section headers */
.section-header {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--historical-text-title);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--historical-border);
}

/* Historical Card - Basata su dashboard-card ma con stile storico */
.historical-card {
    background-color: var(--historical-bg-card);
    border: 1.5px solid var(--historical-border);
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--historical-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Effetto carta stratificata */
.historical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(139, 105, 20, 0.02) 0%,
        rgba(139, 105, 20, 0) 50%);
    pointer-events: none;
}

.historical-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--historical-shadow-hover);
    border-color: var(--historical-accent-gold);
    background-color: var(--historical-bg-card);
}

/* Icone FontAwesome con colore oro antico */
.historical-card i.fas {
    font-size: 2.5rem;
    color: var(--historical-accent-gold);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.historical-card:hover i.fas {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(139, 105, 20, 0.3));
}

/* Titoli card */
.historical-card-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--historical-text-title);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Descrizione card */
.historical-card .text-muted {
    color: var(--historical-text-body) !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Link wrapper - rimuovi decorazioni e colori di default */
a.text-decoration-none .historical-card {
    color: inherit;
}

a.text-decoration-none:hover .historical-card {
    color: inherit;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .historical-archive-title {
        font-size: 2rem;
    }

    .historical-archive-subtitle {
        font-size: 1rem;
    }

    .section-header {
        font-size: 1.5rem;
    }

    .historical-archive-page {
        padding: 1.5rem;
    }

    .historical-card i.fas {
        font-size: 2rem;
    }

    .historical-card-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .historical-archive-title {
        font-size: 1.75rem;
    }

    .historical-card i.fas {
        font-size: 1.75rem;
    }
}

/* Accessibilità - contrasti colori verificati */
/* Gold #8b6914 su #fefdfb = contrasto 5.2:1 (WCAG AA) */
/* Marrone scuro #5a4a3a su #fefdfb = contrasto 8.9:1 (WCAG AAA) */

/* ===== DARK MODE SUPPORT PER ACCORDION GUIDA ARCHIVIO STORICO ===== */

/* Accordion items */
[data-theme="dark"] .accordion-item {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-button {
    background-color: #2b3035;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #343a40;
    color: #fff;
}

[data-theme="dark"] .accordion-button:hover {
    background-color: #3a4046;
}

[data-theme="dark"] .accordion-button:focus {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

[data-theme="dark"] .accordion-body {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* Background light in esempi pratici */
[data-theme="dark"] .bg-light {
    background-color: #2d2d2d !important;
    color: #e0e0e0;
}

/* Tabelle in accordion */
[data-theme="dark"] .accordion-body table {
    color: #e0e0e0;
}

[data-theme="dark"] .accordion-body .table-bordered {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-body .table-bordered th,
[data-theme="dark"] .accordion-body .table-bordered td {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-body thead {
    background-color: #343a40;
}

/* Alert in accordion */
[data-theme="dark"] .accordion-body .alert-warning {
    background-color: #664d03;
    border-color: #997404;
    color: #ffecb5;
}

[data-theme="dark"] .accordion-body .alert-info {
    background-color: #055160;
    border-color: #087990;
    color: #b6effb;
}

/* Card nel flusso di lavoro */
[data-theme="dark"] .card-body.bg-light {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .card.bg-light {
    background-color: #2d2d2d !important;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Titoli in accordion */
[data-theme="dark"] .accordion-body h5,
[data-theme="dark"] .accordion-body h6 {
    color: #f0f0f0;
}

/* Small text muted */
[data-theme="dark"] .accordion-body .small.text-muted {
    color: #adb5bd !important;
}

/* Border rounded bg-white elements */
[data-theme="dark"] .p-3.border.rounded.bg-white {
    background-color: #2d2d2d !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0;
}

/* Alert border in schema relazioni */
[data-theme="dark"] .alert-light.border {
    background-color: #2d2d2d !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0;
}

/* Alert success in esempio completo */
[data-theme="dark"] .alert-success {
    background-color: #0f5132;
    border-color: #146c43;
    color: #d1e7dd;
}
