/* Navigation dropdown menu styles */
.navbar {
    padding: 0;
    min-height: 40px;
    background-color: #003768 !important;
}

/* Desktop: manter altura fixa */
@media (min-width: 992px) {
    .navbar {
        max-height: 40px;
    }
}

/* Mobile: permitir expansão do menu */
@media (max-width: 991px) {
    .navbar {
        min-height: 56px;
        max-height: none;
    }
    
    .navbar-collapse {
        background-color: #003768;
        margin-top: 0;
        padding: 0;
    }
    
    .navbar .navbar-nav {
        width: 100%;
    }
    
    .navbar .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar .nav-link {
        padding: 1rem 1.5rem;
        color: #fff !important;
    }
    
    .navbar .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.2) !important;
        border: none;
        padding: 0;
        margin: 0;
        position: static !important;
        float: none;
    }
    
    .navbar .dropdown-item {
        color: #fff !important;
        padding: 0.875rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
}

.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 1rem;
}

.navbar .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.navbar .dropdown-menu {
    background-color: #003768 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0;
    min-width: 180px;
    margin-top: 0;
    font-size: 0.875rem;
    border-radius: 0 0 0.25rem 0.25rem;
}

.navbar .dropdown-item {
    color: white;
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    white-space: nowrap;
    height: 32px;
}

.navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.navbar .dropdown-item i {
    font-size: 0.9em;
    width: 20px;
    margin-right: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar .nav-link {
    color: white !important;
    display: flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
    height: 40px;
    border-radius: 0.25rem;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .nav-link i {
    font-size: 0.9em;
    width: 20px;
    margin-right: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-alcateia {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.3rem;
    margin: 0 0.1rem;
    height: 22px;
    display: flex;
    align-items: center;
    font-size: 0.7rem;
}

.btn-alcateia:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-toggle::after {
    margin-left: 0.4rem;
    font-size: 0.875rem;
}

/* Make navbar items more compact */
.navbar .nav-item {
    margin-right: 0.15rem !important;
}

/* User Dropdown Styling */
.user-dropdown-menu {
    min-width: 250px;
    padding: 0;
    margin-top: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.user-dropdown-menu .dropdown-header {
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.user-dropdown-menu .dropdown-header strong {
    font-size: 0.95rem;
    color: #003768;
}

.user-dropdown-menu .dropdown-header small {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.user-dropdown-menu .logout-item {
    color: #dc3545;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.user-dropdown-menu .logout-item:hover {
    background-color: #dc3545;
    color: white;
}

.user-dropdown-menu .logout-item i {
    margin-right: 0.5rem;
    width: 20px;
}

/* Ícone de utilizador */
#userDropdown .fa-user-circle {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Desktop: mostrar nome */
@media (min-width: 992px) {
    #userDropdown {
        padding-right: 0.75rem;
    }
}

/* Mobile: esconder nome, mostrar só ícone */
@media (max-width: 991px) {
    .user-dropdown-menu {
        left: auto !important;
        right: 0 !important;
    }
}

/* Logo styling */
.navbar-brand img {
    height: 24px;
    width: auto;
    display: block;
}

/* Dropdown dividers */
.navbar .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

/* Remove default margins from form buttons */
.navbar form {
    margin: 0;
}

.navbar .btn-outline-light {
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
    border-width: 1px;
    height: 22px;
    display: flex;
    align-items: center;
}

/* ========== Global Page Layout - Align all content to the left ========== */

/* Remove Bootstrap's container centering */
.container,
.container-fluid {
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* Force all content areas to align left */
body,
main,
.content,
#content,
.main-content {
    text-align: left !important;
}

/* Reset any centered elements */
.text-center:not(.navbar *):not(.modal *):not(.alert *) {
    text-align: left !important;
}

.mx-auto:not(.navbar *):not(.modal *) {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.justify-content-center:not(.navbar *):not(.modal *) {
    justify-content: flex-start !important;
}

.align-items-center:not(.navbar *) {
    align-items: flex-start !important;
}

/* Keep tables and forms left-aligned */
table,
form {
    margin-left: 0 !important;
}

/* Ensure page content wrapper starts from the left */
.page-content,
.page-wrapper,
.content-wrapper {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 15px !important;
}

/* Align everything in the navbar */
.navbar-nav {
    display: flex;
    align-items: center;
    height: 40px;
}

/* User section */
.navbar .nav-link.disabled {
    opacity: 0.7;
    font-size: 0.875rem;
    padding: 0.3rem 0.6rem;
}

.navbar .btn-outline-light {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    height: 28px;
}

.menu-icon {
    font-size: 1em !important; /* Use relative unit */
    vertical-align: middle;
}

/* ========== Service Icons in Booking Table ========== */

/* Add spacing between service icons */
.table td i.fa-solid,
.table td i.fa-regular {
    margin-right: 12px;
    font-size: 1.3em;
}

/* Optional: Add a subtle hover effect on service icons */
.table td i.fa-solid:hover,
.table td i.fa-regular:hover {
    transform: scale(1.15);
    transition: transform 0.2s ease;
}

/* ========== Animal and Weight Column Styling ========== */

/* Animal badge styling - compact */
.animal-badge {
    display: block;
    padding: 3px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.animal-badge a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
}

.animal-badge a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Weight column (6) - simple and compact with orange color */
#table_bookings tbody tr td:nth-child(7) {
    font-weight: 500;
    color: #e65100;
    font-size: 0.85em;
    line-height: 1.5;
    white-space: nowrap;
}

/* Days column (7) - remove special styling */
#table_bookings tbody tr td:nth-child(8) {
    white-space: nowrap;
}

/* Ensure table cells don't overflow */
#table_bookings td {
    overflow: visible;
    vertical-align: middle;
}

/* Force DataTables pagination and info to be visible - CRITICAL */
#table_bookings_info,
#table_bookings_paginate,
.dataTables_info,
.dataTables_paginate {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    margin-top: 15px !important;
    padding: 10px 0 !important;
}

#table_bookings_paginate,
.dataTables_paginate {
    text-align: right !important;
    float: right !important;
}

#table_bookings_info,
.dataTables_info {
    float: left !important;
    clear: both !important;
}

.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure pagination buttons are visible */
.dataTables_paginate .paginate_button {
    display: inline-block !important;
    padding: 5px 10px !important;
    margin: 0 2px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #f5f5f5 !important;
}

.dataTables_paginate .paginate_button.current {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* Simple styling for DataTables Buttons (replaces problematic CSS library) */
.dt-buttons {
    display: inline-block;
    margin-bottom: 10px;
}

.dt-button {
    display: inline-block;
    padding: 5px 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
}

.dt-button:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
}

.dt-button:active {
    background-color: #d4d4d4;
    border-color: #8c8c8c;
}
