html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.is-invalid {
    border: 1px solid #dc3545;
}


.is-invalid + .ss-main {
    border: 1px solid #dc3545;
}

.bg-login-image {
    background-image: url("/images/canile.jpg");
    background-size: cover;
    background-position: center;
}

.is-invalid {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.is-invalid + .ss-main::after {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}
/* Ensure all green buttons are the same size */
.btn-success {
    min-width: 180px; /* Adjust width as needed */
}

/* Ensure all buttons in action columns have the same size */
table.dataTable td .btn-group .btn {
    min-width: 30px; /* Adjust width to make all buttons equal */
    text-align: center;
}

/* Align buttons in the last column to the right */
table.dataTable td:last-child {
    text-align: right;
}

/* Ensure buttons inside the last cell are in a single row */
table.dataTable td .btn-group {
    display: flex;
    justify-content: flex-end;
}

    /* Add spacing between the buttons */
    table.dataTable td .btn-group .btn {
        margin-left: 2px; /* Adds a small space between buttons */
    }

.header-banner {
    height: 60px; /* Reduce height */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to left, #6eb5ff, #e6f7ff); /* Softer gradient */
    padding: 0 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.header-logo {
    position: absolute;
    top: 0px; /* Moves logo slightly up */
    left: 50%;
    transform: translateX(-50%);
    width: 120px; /* Adjust logo size */
    z-index: 15; /* Higher z-index to stand above all */
    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.2)); /* Adds soft shadow */
}

.header-banner h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 36px;
    color: #37474F;
    margin: 0;
}

.index-header {
    font-family: 'Fredoka One', cursive;
    font-size: 28px;
    color: #37474F;
    margin: 0;
}

@media (max-width: 576px) {
    .header-logo {
        width: 100px; /* o pił piccolo se necessario */
        margin-top: 1rem;
    }

    .header-banner h2 {
        font-size: 1.8rem;
        margin-top: 0.5rem;
        text-align: center;
        z-index: 16;
    }

    .index-header {
        font-size: 1.8rem;
        z-index: 16;
    }

    .header-banner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .last-navbar-item {
        margin-bottom: 1rem;
    }

    .btn-icon-only .responsive-text {
        display: none !important;
    }

    .swiper-slide img {
        object-fit: contain !important;
        padding-top: 10px;
        height: 180px; /* or auto if you want full height flexibility */
        width: 100%;
    }

    .swiper-slide {
        width: 90vw !important;
        height: auto;
    }
}


.navbar {
    /*background: rgba(190, 200, 255, 0.90); Light azure */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    /*margin: 0px;  Adds left and right margins */
    /*border-radius: 8px;*/ /* Optional: adds soft rounded corners */
}


#dogCarousel {
    max-width: 800px; /* Set a max width */
    margin: auto; /* Center the carousel */
    position: relative;
}

.carousel-item {
    text-align: center;
    max-height: 500px; /* Adjust max height */
}

.carousel-img, .carousel-video {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain; /* Ensures full image/video is visible */
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%; /* Adjust button size */
    filter: invert(100%); /* Makes arrows visible on dark backgrounds */
}


.table-container {
    max-height: 330px; /* Adjust height as needed */
    overflow-y: auto;
    border: 1px solid #ddd;
}

/* Fix the table header */
.table-container thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border-bottom: 2px solid #ddd;
}

/* Align the upper fields with the table */
.row.g-2 {
    display: flex;
    justify-content: space-between;
}
/* Ensure the modal takes up most of the screen */
/* Ensure the modal takes a fixed height */
#modalBox .modal-dialog {
    max-width: 80%; /* Adjust width */
    height: 580px; /* Set a fixed height for the modal */
    display: flex;
}

#modalBox .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Modal body should take all remaining space */
#modalBox .modal-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

/* Table container should have a fixed height and scroll */
#modalBox .table-container {
    flex-grow: 1;
    height: 50vh; /* Fixed height for the table */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ddd;
}

/* Fix the table header so it stays visible when scrolling */
#modalBox .table-container thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border-bottom: 2px solid #ddd;
}

/* Ensure table fully occupies the container */
#modalBox .table {
    width: 100%;
    margin-bottom: 0;
}


/* Ensure Dropzone container does not expand vertically */
.dropzone {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    max-width: 100%; /* Prevents expanding beyond the container */
    min-height: 345px; /* Ensures enough space for previews */
    max-height: 345px; /* Ensures enough space for previews */
    overflow-y: auto;
}


/* Allow thumbnails to wrap inside the dropzone */
.dropzone .dz-preview {
    margin: 8px;
}


.dropzone .dz-message {
    width: 100%;
    flex-basis: 100%;
    text-align: center;
}

/* Ensures that previews appear in a row */
.dropzone .dz-preview {
    display: inline-block; /* Aligns items horizontally */
    margin-right: 10px; /* Adds spacing between items */
    width: 100px !important; /* Fix thumbnail width */
    height: 100px !important; /* Fix thumbnail height */
    position: relative;
}

/* Ensure thumbnails are contained within their preview */
.dropzone .dz-preview .dz-image {
    width: 100% !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scale and crop images properly */
.dropzone .dz-preview .dz-image img,
.dropzone .dz-preview .dz-image video {
    object-fit: cover; /* Ensures proper cropping */
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.dropzone .dz-preview .dz-remove {
    position: absolute !important;
    top: 5px;
    right: 5px;
    font-size: 16px;
    background: white;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    z-index: 20; /* Ensure it appears above thumbnails */
    cursor: pointer !important;
}

.dropzone .dz-preview .dz-remove i {
    color: red;
    font-size: 16px;
    cursor: pointer !important; /* Ensure icon itself is clickable */
}

/* Prevent clicks from being intercepted */
.dropzone .dz-preview {
    position: relative;
}

/* Ensure images do not overlap */
.dropzone .dz-preview .dz-image {
    position: relative;
    z-index: 5;
    pointer-events: none; /* Prevents clicks on image blocking the remove button */
}

.dz-remove::before {
    content: none !important; /* Removes default Dropzone styling */
}

.dz-remove {
    background: transparent !important;
    border: none !important;
    outline: none !important;
}
/* Add scrollbar styles */
.dropzone::-webkit-scrollbar {
    height: 6px;
}

.dropzone::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.dropzone::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.dropzone-disabled {
    pointer-events: none; /* Disable click */
    opacity: 0.5; /* Reduce visibility */
    background-color: #f8f9fa; /* Light gray background */
    cursor: not-allowed;
}

th.action-column, td.action-column {
    width: 120px;
    text-align: right;
    white-space: nowrap;
}

#dogCardCarousel {
    height: 280px; /* Prevent layout shift */
    overflow: hidden;
    position: relative;
}

#dogCardCarousel .carousel-inner {
    height: 100%;
    overflow: hidden;
}

#dogCardCarousel .carousel-item {
    height: 100%;
}

#dogCardCarousel .carousel-item > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.card.dog-card {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dog-card img {
    height: 180px;
    object-fit: cover;
}

.swiper {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
}

.swiper-slide {
    width: 240px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    transition: transform 0.3s ease;
    text-align: center;
}

.swiper-slide img {
    width: 100%;
    height: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.swiper-slide .card-body {
    padding: 10px;
    flex-grow: 1;
}

.swiper-slide h5 {
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: #37474F;
}

.swiper-slide p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}



.dog-details {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.dog-carousel img,
.dog-carousel video {
    object-fit: cover;
    height: 400px;
}

#tblCani tbody td {
    vertical-align: middle;
}

#tblCani tbody tr:hover {
    background-color: #f5f5f5;
}
.dataTables_length select {
    width: auto;
    display: inline-block;
    min-width: 70px; /* per evitare che sia troppo stretto */
    height: calc(1.5em + .75rem + 2px); /* altezza come gli input bootstrap */
    padding: .375rem .75rem;
    font-size: .875rem;
}