/**
 * Custom CSS overrides for Steady Driving School
 * This file contains custom styles that override default Bootstrap and theme styles
 */

/* Make all card headers with bg-primary class have white text */
.card .card-header.bg-primary,
.card .card-header.bg-primary *,
.card-header.bg-primary,
.card-header.bg-primary *,
.bg-primary,
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.bg-primary p,
.bg-primary span,
.bg-primary div {
  color: #ffffff !important;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 62px;
    height: 62px;
    bottom: 28px;
    right: 28px;
    background: linear-gradient(135deg, #25D366, #1fa855);
    color: #FFF;
    border-radius: 20px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 18px 38px rgba(37, 211, 102, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 24px 46px rgba(37, 211, 102, 0.34);
}

.whatsapp-button {
    width: 62px;
    height: 62px;
    text-decoration: none;
    color: #FFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    color: #FFF !important;
    text-decoration: none;
}

.whatsapp-button i {
    margin-top: 0;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 18px;
        right: 18px;
        font-size: 24px;
    }
    
    .whatsapp-button {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 768px) {
    .marketing-leads-table thead {
        display: none;
    }

    .marketing-leads-table,
    .marketing-leads-table tbody,
    .marketing-leads-table tr,
    .marketing-leads-table td {
        display: block;
        width: 100%;
    }

    .marketing-leads-table tr {
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        margin: 0.75rem;
        padding: 0.5rem 0;
        background-color: #ffffff;
    }

    .marketing-leads-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.4rem 0.75rem;
        border: none;
    }

    .marketing-leads-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        flex: 0 0 45%;
    }

    .marketing-leads-table td:last-child {
        justify-content: flex-start;
        gap: 0.5rem;
    }
}


/* Toast notifications: slightly larger for better visibility */
.toast-container-app {
    max-width: min(92vw, 440px);
}

.toast-app {
    min-width: min(92vw, 360px);
    font-size: 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.toast-app .toast-body {
    padding: 0.85rem 1rem;
}

.toast-app .btn-close {
    transform: scale(1.1);
}

.dashboard-stat.stat-uniform {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.dashboard-stat.stat-uniform .stat-meta {
    min-height: 3.5rem;
}

.income-expense-chart-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

.income-expense-chart-frame {
    height: 320px;
    min-width: 720px;
    position: relative;
}

.income-expense-chart-frame canvas {
    display: block;
    height: 100% !important;
    width: 100% !important;
}

@media (max-width: 576px) {
    .toast-app {
        min-width: min(92vw, 320px);
    }

    .dashboard-stat.stat-uniform {
        min-height: 220px;
    }

    .income-expense-chart-frame {
        height: 280px;
        min-width: 640px;
    }
}
