body, html {
    background-color: #e8e8e8 !important;
    min-height: 100vh;
}

.container-fluid {
    padding-right: 0;
    padding-left: 0;
}

.bg-error {
    background-color: #dc3545;
    color: #fff;
}

.navbar {
    height: 70px;

}

img#logo {
    height: 70px;
}

.permanence-header {
    text-align: center;
    background-color: #236f7d;
    color: #fff;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 45px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

.permanence-header.is-itinerant {
    background-color: #f36523;
}

/* Color picker widget styling */
.color-picker {
    width: 60px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    cursor: pointer;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.permanence {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    box-shadow: 0px 0px 10px #9f9f9f;
    margin-bottom: 10%;
}

.permanence-schedule {
    min-height: 120px;
}

.btn-lcdmn, .btn-primary.btn-lcdmn {
    background-color: #236f7d;
    color: #fff !important;
    border-color: #236f7d;
}

.btn-lcdmn:hover {
    border: 1px solid;
    color: #236f7d !important;
    background-color: #fff;
}

.btn-lcdmn-outline {
    border: 1px solid #236f7d;
    color: #236f7d !important;
}

.btn-lcdmn-outline:hover {
    background-color: #236f7d;
    color: #fff !important;
    border-color: #236f7d;
}

.permanence-name {
    height: 100px;
}

.permanence-address {
    font-style: italic;
}

#permanence-calendar {
    display: flex;
    justify-content: space-between;
}

.permanence-calendar-day {
    width: 100%;
}

.permanence-calendar-day {
    border-right: 1px solid #236f7d;
}

.permanence-calendar-day:last-child {
    border-right: none;
}

.permanence-calendar-day-title {
    text-align: center;
}

#beneficiary-search, #beneficiary-selected, #create-appointment #datetimepicker-wrapper, #btn-appointment-validation {
    display: none;
}

#appointment {
    font-size: 24px;
    padding: 70px;
    background-color: #f4f4f4;
    border-radius: 10px;
    box-shadow: 0 0 20px #d2d2d2;
}

#no-schedule-available {
    display: none;
}

#datetimepicker-wrapper tbody tr th, #datetimepicker-wrapper thead tr th:first-child {
    display: none;
}

.pending-social-workers-wrapper {
    box-shadow: 0px 0px 20px #d7d7d7;
    border-radius: 7px;
    background-color: #fff;
}

.pending-social-worker {
    border-bottom: solid 1px #c6c6c6;
    width: 97%;
    margin: 40px auto;
}

.pending-social-worker:last-child {
    border-bottom: none;
}

#social-worker-detail, #social-structure-detail, #mediator-detail, #beneficiary-detail, #beneficiary-detail-observations {
    background-color: #fff !important;
    padding: 50px;
    border-radius: 7px;
    box-shadow: 0px 0px 30px #d7d7d7;
}

#social-worker-detail h5 {
    text-align: center;
    padding: 10px;
    margin-bottom: 40px;
}

.administration-col {
    background-color: #fff;
    box-shadow: 0px 0px 20px #d7d7d7;
    border-radius: 7px;
}

.mediator-list-mediator, .socialworker-list {
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    background-color: #fff;
}

.mediator-list-header, .socialworker-list-header {
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    font-size: 40px;
    text-align: center;
    padding: 10%;
    background-color: #236f7d;
    color: #fff;
}

.mediator-account-not-validated {
    border-radius: 0px !important;
}

.mediator-list-mediator a, .mediator-list-mediator a:hover, .socialworker-lis a, .socialworker-lis a:hover {
    color: initial;
}

a {
    color: #236f7d !important;
}

.bg-lcdmn {
    background: #236f7d;
    color: #fff !important;
}

.mediator-appointment {
    background-color: #fff;
    border-radius: 7px;
    height: 70px;
    box-shadow: 0 0 20px #d2d2d2;
}

.mediator-appointment-date {
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
    text-align: center;
}

.mediator-appointment-date, .mediator-appointment-beneficiary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: initial;
}

.mediator-appointment:hover {
    box-shadow: 0 0 20px #b0b0b0;
}

#div_id_monday_open_hour, #div_id_tuesday_open_hour, #div_id_wednesday_open_hour, #div_id_thursday_open_hour,
#div_id_friday_open_hour, #div_id_saturday_open_hour, #div_id_sunday_open_hour, #div_id_monday_close_hour,
#div_id_tuesday_close_hour, #div_id_wednesday_close_hour, #div_id_thursday_close_hour, #div_id_friday_close_hour,
#div_id_saturday_close_hour, #div_id_sunday_close_hour {
    display: none;
}


.appointment-reason-dropdown .dropdown-menu.show {
    height: 250px;
    overflow-y: scroll;
    padding-top: 0;
    z-index: 9999;
}

.reason-appointment-main-title {
    background-color: #236f7d;
    color: #fff;
    font-weight: bold;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.reason-appointment-title {
    padding-left: 30px;
    font-weight: bold;
}

.appointment-reason-dropdown .dropdown-menu.show .dropdown-item {
    padding-left: 40px;
}

#appointment-reason-wrapper, #id_reason_wrapper {
    display: none;
}

.dashboard-beneficiaries, .dashboard-calendar {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Custom event styling for FullCalendar */
.fc-event {
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    margin: 1px 0 !important;
}

.fc-event-main {
    padding: 4px 6px !important;
}

.fc-event-main-frame {
    height: auto !important;
}

.custom-event-content {
    font-family: 'Arial', sans-serif;
    line-height: 1.2;
}

.event-title {
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 2px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 11px;
    opacity: 0.9;
    color: #ffffff;
    font-weight: 500;
}

/* Hover effects for events */
.fc-event:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}

/* Responsive event sizing */
@media (max-width: 768px) {
    .event-title {
        font-size: 10px !important;
    }

    .event-time {
        font-size: 8px !important;
    }

    .event-description {
        font-size: 8px !important;
    }
}

/* Ensure events have good contrast */
.fc-event .fc-event-main {
    background-color: inherit !important;
}

/* FullCalendar navigation button styling */
.fc-button-primary {
    background-color: #236f7d !important;
    border-color: #236f7d !important;
}

.fc-button-primary:hover {
    background-color: #1a5a65 !important;
    border-color: #1a5a65 !important;
}

.fc-button-primary:focus {
    background-color: #236f7d !important;
    border-color: #236f7d !important;
    box-shadow: 0 0 0 0.2rem rgba(35, 111, 125, 0.25) !important;
}

.fc-button-primary:active {
    background-color: #1a5a65 !important;
    border-color: #1a5a65 !important;
}

.fc-button-primary:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* FullCalendar previous days styling */
.fc-day.fc-day-past {
    background-color: #f8f9fa !important;
}

.fc-day.fc-day-past .fc-daygrid-day-number {
    color: #6c757d !important;
}

.fc-day.fc-day-past .fc-daygrid-day-events {
    opacity: 0.7;
}

.permanence-body {
    background-color: #fff;
}

.form-wrapper {
    background-color: #fff;
    width: 70%;
    padding: 50px 100px;
    border-radius: 7px;
}

.form-wrapper h1 {
    background-color: #236f7d;
    width: 500px;
    margin-left: -30%;
    padding: 18px 20px;
    color: #fff;
    margin-bottom: 50px;
    border-radius: 7px;
}

#create-appointment-wrapper {
    background-color: #fff;
    width: 80%;
    padding: 50px 100px;
    border-radius: 7px;
}

.xdsoft_datetimepicker.xdsoft_inline {
    width: 100%;
}

.xdsoft_datepicker {
    width: 85% !important;
}

.xdsoft_timepicker {
    width: 12% !important;
}

@media (max-width: 767px) {
    #navbarNav {
        background-color: #f8f9fa;
        margin-top: -10px;
        padding: 20px;
        z-index: 1;
    }

    .form-wrapper .btn, .permanence .btn {
        margin-top: 30px;
    }

    .form-wrapper {
        background-color: #fff;
        width: 100%;
        padding: 30px;
        border-radius: 7px;
    }

    .form-wrapper h1 {
        background-color: #236f7d;
        width: 100%;
        margin-left: 0;
        padding: 18px 20px;
        color: #fff;
        margin-bottom: 50px;
        border-radius: 7px;
    }

    .xdsoft_datepicker, .xdsoft_timepicker {
        width: 100% !important;
    }

    .appointment-reason-dropdown .dropdown-menu.show {
        width: 140%;
        margin-left: -18%;
    }

    #appointment {
        padding: 30px;
    }

    #appointment-permanence .fa-map-marked-alt {
        display: none;
    }

    .administration-col {
        margin-bottom: 30px;
    }

    .mediator-appointment-date {
        border-top-left-radius: 7px;
        border-top-right-radius: 7px;
        border-bottom-left-radius: 0;
    }

    .mediator-appointment-beneficiary {
        text-align: center;
    }

    .nav-item {
        border-bottom: 1px solid #dbdbdb;
    }

    .nav-item:last-of-type {
        border: none;
    }
}