/* Custom styles for Fardeau app */

/* Override Bootstrap primary color for navbar */
.navbar.bg-primary {
    background-color: #832561 !important;
    background: linear-gradient(135deg, #832561 0%, #6b1e4a 100%) !important;
}

/* Navbar links and icons styling */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white !important;
}

.navbar-dark .navbar-brand {
    color: white !important;
}

.navbar-dark .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Override Bootstrap primary text color */
.text-primary {
    color: #832561 !important;
}

/* Override other Bootstrap primary classes */
.bg-primary {
    background-color: #832561 !important;
}

.border-primary {
    border-color: #832561 !important;
}

.btn-outline-primary {
    color: #832561 !important;
    border-color: #832561 !important;
}

.btn-outline-primary:hover {
    background-color: #832561 !important;
    border-color: #832561 !important;
    color: white !important;
}

.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #832561 !important;
    border-color: #832561 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

/* Override default link colors */
a.btn-link {
    color: #832561 !important;
}

a.btn-link:hover {
    color: #6b1e4a !important;
}

a.btn-link:visited {
    color: #832561 !important;
}

a.btn-link:focus {
    color: #832561 !important;
}

/* Ensure button text remains white */
.btn-primary {
    color: white !important;
}

.btn-primary:hover {
    color: white !important;
}

/* Specific link styles for cards and other elements */
.card a:not(.btn):not(.btn-primary):not(.btn-outline-primary) {
    color: #832561 !important;
}

.card a:not(.btn):not(.btn-primary):not(.btn-outline-primary):hover {
    color: #6b1e4a !important;
}

.dropdown-item {
    color: #832561 !important;
}

.dropdown-item:hover {
    color: white !important;
    background-color: #832561 !important;
}

/* Fixed navbar styles */
.navbar.fixed-top {
    box-shadow: 0 2px 10px rgba(131, 37, 97, 0.2);
    z-index: 1030;
}

/* Main content spacing for fixed navbar */
.main-content {
    margin-top: 76px;
    padding-top: 20px;
}

/* Page title in navbar */
.navbar-text {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive navbar title */
@media (max-width: 768px) {}

@media (max-width: 576px) {

    .navbar-text {
        font-size: 0.9rem;
        display: none;
        /* Hide on small screens to save space */
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

/* Simple charges list with current day line */
.charges-list-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.charges-list {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
}

.charge-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.charge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.charge-item.past-paid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.charge-item.past-unpaid {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.charge-item.upcoming-unpaid {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

.charge-item.upcoming-paid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}


.charge-day {
    font-weight: 900;
    font-size: 1.2rem;
    color: #495057;
    min-width: 40px;
    text-align: center;
    margin-right: 15px;
}

.charge-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.charge-info {
    flex: 1;
}

.charge-name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    margin-bottom: 4px;
}

.charge-type {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.charge-amount {
    font-weight: 900;
    font-size: 1.3rem;
    color: #212529;
}

.payment-status {
    margin-left: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.payment-status.paid {
    background: #28a745;
    color: white;
}

.payment-status.unpaid {
    background: #ffc107;
    color: #212529;
}

/* Current day block */
/* Use a purple gradient background for the current day block */
.current-day-block {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    /* Gradient from a lighter to a darker shade of #832561 */
    background: linear-gradient(135deg, #a14a8a 0%, #832561 100%);
    /* Adjust box-shadow to match the purple theme */
    box-shadow: 0 4px 15px rgba(131, 37, 97, 0.3);
    color: white;
    font-weight: bold;
    border: 3px solid #fff;
    z-index: 10;
}

.current-day-block .charge-day {
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.current-day-block .charge-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-day-block .charge-info {
    flex: 1;
}

.current-day-block .charge-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.current-day-block .charge-type {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.current-day-block .charge-amount {
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: right;
}

.current-day-block .text-muted {
    font-size: 0.9rem;
    color: white !important;
    font-style: italic;
    font-weight: 400;
}

.current-day-block .payment-status {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
}


.current-day {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.month-year {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 600;
    margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wheel-container {
        width: 320px;
        height: 250px;
    }

    .wheel-item {
        height: 50px;
        font-size: 1rem;
    }

    .current-day {
        font-size: 1.2rem;
    }

    .month-year {
        font-size: 0.7rem;
    }
}

/* Custom card styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Form styles */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #832561;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25);
}

/* Override checkbox and radio button colors */
.form-check-input:checked {
    background-color: #832561 !important;
    border-color: #832561 !important;
}

.form-check-input:focus {
    border-color: #832561 !important;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

.form-check-input:checked:focus {
    background-color: #832561 !important;
    border-color: #832561 !important;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

/* Override other form elements */
.form-range::-webkit-slider-thumb {
    background-color: #832561 !important;
}

.form-range::-moz-range-thumb {
    background-color: #832561 !important;
}

.form-range::-ms-thumb {
    background-color: #832561 !important;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

/* Button styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.btn-primary {
    background: linear-gradient(135deg, #832561, #6b1e4a);
    border: none;
    box-shadow: 0 2px 8px rgba(131, 37, 97, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6b1e4a, #5a1a3e);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(131, 37, 97, 0.4);
}

/* Override Bootstrap secondary button colors */
.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    color: white !important;
}

.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active {
    background-color: #832561 !important;
    border-color: #832561 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

/* Override other button focus/active states */
.btn:focus,
.btn:active,
.btn.active {
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    background-color: #832561 !important;
    border-color: #832561 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(131, 37, 97, 0.25) !important;
}

/* Badge styles */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Payment toggle styles */
.payment-toggle {
    transform: scale(1.2);
}

.payment-toggle:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Statistics chart container */
#pieChart {
    max-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }

    .wheel-center {
        width: 80px;
        height: 80px;
    }

    .current-day {
        font-size: 1.8rem;
    }

    .month-year {
        font-size: 0.7rem;
    }

    .charge-item {
        font-size: 0.7rem;
        padding: 6px 8px;
        min-width: 60px;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

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

/* Ensure action buttons are visible */
.d-flex.justify-content-end {
    position: relative;
    z-index: 5;
}