/* --- General & Typography --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
}

/* --- Responsive Action Headers --- */
/* Used on index.php, yatra_manage.php etc. for button groups */
.action-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

/* On medium screens and up, switch to horizontal layout */
@media (min-width: 768px) {
    .action-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.action-header .btn-group {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on very small screens */
    gap: 0.5rem;
}


/* --- Responsive Tables --- */
/* Hide table headers on small screens, as they will be replaced by data attributes */
@media (max-width: 767.98px) {
    .table-responsive-stack thead {
        display: none;
    }

    .table-responsive-stack tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        margin-bottom: 1rem;
        border-radius: 0.375rem; /* Bootstrap's .card border-radius */
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Bootstrap's .shadow-sm */
    }

    .table-responsive-stack tbody td {
        display: block;
        text-align: right; /* Align data to the right */
        position: relative;
        padding-left: 50%; /* Make space for the label */
        border: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .table-responsive-stack tbody td:last-child {
        border-bottom: none; /* Remove border from last cell in the "card" */
    }

    /* Use data-label attribute from the PHP file to create a pseudo-element label */
    .table-responsive-stack tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem; /* padding */
        text-align: left;
        font-weight: bold;
        white-space: nowrap;
    }
}

/* --- Specific Tweaks for Yatra Manage Table Inputs --- */
.form-update-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch; /* Default alignment */
}

/* On mobile, align inputs differently for better layout */
@media (max-width: 767.98px) {
    .form-update-row {
        align-items: flex-end; /* Align inputs to the right */
    }

    .form-update-row .form-control-sm {
        max-width: 150px; /* Stop inputs from taking full width */
    }
}

/* On desktop, keep them inline but with spacing */
@media (min-width: 768px) {
    .form-update-row {
        flex-direction: row;
        gap: 0.25rem;
        align-items: center;
    }
}