/* Custom CSS for Gym Management System with AdminLTE */

/* Dashboard Card Title Styles - Background color only for text width */
/* Stat card titles (like "Total Members", "Total Trainers", etc.) */
.stat-card .text-xs.font-weight-bold,
.card .text-xs.font-weight-bold.text-uppercase,
.card-body .text-xs.font-weight-bold,
.card-body .col .text-xs.font-weight-bold {
    display: inline-block !important;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    width: auto !important;
}

/* Card header titles (like "Financial Overview (Last 7 Days)") */
.card-header h6.font-weight-bold,
.card-header h6.m-0.font-weight-bold,
.card-header .font-weight-bold,
.card-header.py-3 h6,
.card-header.py-3 .font-weight-bold {
    display: inline-block !important;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    width: auto !important;
    max-width: 100%;
}

/* Override flex behavior for card headers with titles */
.card-header.d-flex h6.font-weight-bold,
.card-header.d-flex .font-weight-bold {
    flex: 0 0 auto !important;
    width: auto !important;
}

/* Member dashboard card titles */
.card-header .card-title {
    display: inline-block !important;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    width: auto !important;
}

/* Trainer dashboard card titles */
.card-header h6.m-0 {
    display: inline-block !important;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    width: auto !important;
}

/* Delete Confirmation Modal Styles */
#deleteConfirmModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#deleteConfirmModal .modal-body {
    padding: 2rem;
}

#deleteConfirmModal .fa-exclamation-circle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#deleteConfirmModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#deleteConfirmModal .btn-danger {
    min-width: 100px;
}

#deleteConfirmModal .btn-secondary {
    min-width: 100px;
}

/* Approve Booking Confirmation Modal Styles */
#approveBookingModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#approveBookingModal .modal-body {
    padding: 2rem;
}

#approveBookingModal .fa-check-circle {
    animation: pulse 2s infinite;
}

#approveBookingModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#approveBookingModal .btn-success {
    min-width: 100px;
}

#approveBookingModal .btn-secondary {
    min-width: 100px;
}

/* Reject Booking Confirmation Modal Styles */
#rejectBookingModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#rejectBookingModal .modal-body {
    padding: 2rem;
}

#rejectBookingModal .fa-times-circle {
    animation: pulse 2s infinite;
}

#rejectBookingModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#rejectBookingModal .btn-danger {
    min-width: 100px;
}

#rejectBookingModal .btn-secondary {
    min-width: 100px;
}

/* Publish Notification Confirmation Modal Styles */
#publishNotificationModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#publishNotificationModal .modal-body {
    padding: 2rem;
}

#publishNotificationModal .fa-bullhorn {
    animation: pulse 2s infinite;
}

#publishNotificationModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#publishNotificationModal .btn-success {
    min-width: 100px;
}

#publishNotificationModal .btn-secondary {
    min-width: 100px;
}

/* Unpublish Notification Confirmation Modal Styles */
#unpublishNotificationModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#unpublishNotificationModal .modal-body {
    padding: 2rem;
}

#unpublishNotificationModal .fa-ban {
    animation: pulse 2s infinite;
}

#unpublishNotificationModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

#unpublishNotificationModal .btn-warning {
    min-width: 100px;
}

#unpublishNotificationModal .btn-secondary {
    min-width: 100px;
}

/* Override AdminLTE primary color with settings */
.brand-link {
    font-weight: 600;
}

/* Custom sidebar styling */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--primary-color, #007bff);
    color: #fff;
}

/* Card enhancements */
.card {
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.125);
}

/* Table enhancements */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Button enhancements */
.btn {
    border-radius: 0.25rem;
    font-weight: 400;
}

/* Action button enhancements - icon with text */
.btn-group .btn-sm i {
    margin-right: 0.25rem;
}

.btn-group .btn-sm span {
    margin-left: 0.125rem;
}

/* Ensure buttons have proper spacing when text is shown */
.btn-group .btn-sm {
    padding: 0.25rem 0.5rem;
}

@media (min-width: 768px) {
    .btn-group .btn-sm {
        padding: 0.25rem 0.75rem;
    }
    
    .btn-group .btn-sm i {
        margin-right: 0.375rem;
    }
}

/* Form enhancements */
.form-control {
    border-radius: 0.25rem;
}

.form-control:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Badge enhancements */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* Alert enhancements */
.alert {
    border-radius: 0.25rem;
    border: none;
}

/* Small box (stat cards) enhancements */
.small-box {
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    display: block;
    margin-bottom: 20px;
    position: relative;
}

.small-box > .inner {
    padding: 10px;
}

.small-box > .small-box-footer {
    background-color: rgba(0,0,0,.1);
    color: rgba(255,255,255,.8);
    display: block;
    padding: 3px 0;
    position: relative;
    text-align: center;
    text-decoration: none;
    z-index: 10;
}

.small-box:hover .small-box-footer {
    background-color: rgba(0,0,0,.15);
}

/* Profile photo styling */
.img-circle {
    border-radius: 50%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-header .navbar-nav {
        flex-direction: row;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
    }
}

/* Print styles */
@media print {
    .main-sidebar,
    .main-header,
    .main-footer,
    .content-header .breadcrumb {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
    }
}
