html {
    font-size: 12px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.nunito-globalfont {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

@media (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
    height: 100%;
}

body {
    /*margin-bottom: 60px;*/
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    background-color: #f8f9fa;
}

.main-container {
    flex: 1;
    overflow: hidden;
    padding-top: 1rem;
}

.content-with-location {
    height: calc(100vh - 140px);
    overflow-y: auto;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 64px;
    line-height: 60px;
    background-color: #fefefe;
    z-index: 1000;
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.footer-brand {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    color: black;
}

.location-item {
    cursor: pointer;
    padding: 3px 5px;
    display: block;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

    .location-item:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .location-item.selected {
        background-color: rgba(255, 103, 31, 0.1);
        color: var(--bs-primary);
        font-weight: bold;
    }

#canvas-area div {
    border-radius: 5px;
}

.btn-success {
    display: flex;
    align-items: center;
}

    .btn-success i {
        margin-right: 5px;
    }

.drag-handle {
    cursor: move;
    color: #666;
    padding: 0 5px;
}

.question-element {
    transition: background-color 0.2s;
}

    .question-element:hover {
        background-color: #f8f9fa;
    }

.dropdown-item i {
    margin-right: 8px;
}

.group-element {
    position: relative;
}

.group-drag-handle {
    color: #666;
    padding: 0 5px;
    cursor: move;
}

.group-element.sortable-ghost {
    opacity: 0.4;
}

.group-element.sortable-chosen {
    background-color: #fff !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.questions-container {
    padding-left: 20px;
}
/* Add to @section Styles */
.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 8px;
}

.week-view .calendar-day {
    height: 600px;
}

.day-view .calendar-day {
    height: 800px;
}

.time-slot {
    height: 60px;
    border-top: 1px solid #dee2e6;
    position: relative;
}

.time-label {
    position: absolute;
    left: 8px;
    top: -27px;
    font-size: 0.8rem;
    color: #6c757d;
    background: white;
    padding: 0 4px;
}

.week-event, .day-event {
    position: absolute;
    left: 60px;
    right: 8px;
/*    background: #007bff;
*/    color: black;
    padding: 4px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.day-event {
    left: 80px;
}

.week-event .event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-event .event-description {
    font-size: 0.8rem;
    margin-top: 4px;
}

.time-slots {
    position: relative;
    height: 100%;
}

.week-event, .day-event {
    position: absolute;
/*    background-color: #007bff;
    color: white;*/
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

    .week-event:hover, .day-event:hover {
        transform: scale(1.02);
        z-index: 2;
    }

.calendar-day {
    position: relative;
    min-height: 800px;
}

.events-container {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

    .events-container .event {
        pointer-events: all;
    }

.timeline-column {
    width: 60px;
    padding: 0;
    border-right: 2px solid #dee2e6;
}

.week-view .calendar-day,
.day-view .calendar-day {
    height: 1440px; /* 24 hours * 60px */
    position: relative;
}

.time-slot {
    height: 60px;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.time-label {
    position: absolute;
    right: 10px;
    top: -10px;
    font-size: 0.8rem;
    color: #6c757d;
    background: white;
    padding: 0 4px;
}

.week-view .events-container,
.day-view .events-container {
    position: absolute;
    top: 0; /* height of date header */
    left: 0;
    right: 0;
    bottom: 0;
}

.week-event,
.day-event {
    position: absolute;
    left: 4px;
    right: 4px;
    min-height: 20px;
    /*background-color: #007bff;*/
    color: black;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.85rem;
    overflow: hidden;
    cursor: pointer;
}

.day-view .calendar-day {
    height: 1440px !important; /* 24 hours * 60px */
    position: relative;
    border: 1px solid #dee2e6;
}

.day-view .events-container {
    position: absolute;
    top: 0;
    left: 60px; /* Width of time column */
    right: 0;
    bottom: 0;
    pointer-events: auto;
}

.day-event {
    position: absolute;
    min-height: 20px;
    padding: 2px 4px;
    font-size: 0.8rem;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
/*    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
*/    z-index: 1;
}

.time-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.timeline-header {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

.time-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.time-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(0,0,0,0.1);
}

    .time-grid-line.half-hour {
        border-top-style: dashed;
    }

.time-slot {
    position: relative;
    height: 60px;
    border-bottom: 1px solid #dee2e6;
}

.time-label {
    position: absolute;
    right: 8px;
    top: -10px;
    font-size: 0.8rem;
    color: #6c757d;
    background: white;
    padding: 0 4px;
}

.week-event {
    position: absolute;
    min-height: 20px;
    padding: 2px 4px;
    font-size: 0.8rem;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
/*    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
*/    z-index: 1;
    box-sizing: border-box;
    margin: 0 1px;
}

    .week-event:hover {
        z-index: 2;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .week-event .event-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .week-event .event-time {
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Event Status Colors */
.event-status-default {
    background-color: #e3f2fd;
    border-left: 3px solid #0061ad;
}
/* Light blue */
.event-status-created {
    background-color: #f5f5f5;
    border-left: 3px solid #9e9e9e;
}
/* Grey */
.event-status-scheduled {
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
}
/* Green */
.event-status-downloaded {
    background-color: #f7f7ba;
    border-left: 3px solid #f2f235;
}
/* Orange */
.event-status-inexecution {
    background-color: #fcdfbb;
    border-left: 3px solid #f0921f;
}
/* Blue */
.event-status-submitted {
    background-color: #bef4b8;
    border-left: 3px solid #25d918;
}
/* Indigo */
.event-status-reviewed {
    background-color: #bef5ba;
    border-left: 3px solid #03a9f4;
}
/* Light Blue */
.event-status-expired {
    background-color: #ffebee;
    border-left: 3px solid #f44336;
}
/* Red */

/* Home page styles */
.home-container {
    width: 100%;
    min-height: calc(100vh);
    height: calc(100vh);
    margin: 0;
    padding: 0;
}

.home-container .row {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

.branding-section {
    background-color: #f8f9fa;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh); /* Force minimum height equal to viewport minus footer */
}

.login-section {
    background-color: #ffffff;
    padding: 2rem;
    min-height: calc(100vh); /* Force minimum height equal to viewport minus footer */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Update the container for the branding content */
.branding-section .text-center {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.welcome-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.terms-content {
    max-height: 60vh;
    overflow-y: auto;
}

.terms-content ol li {
    margin-bottom: 1rem;
}

.terms-content ul li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .branding-section {
        padding: 1rem;
    }

    .login-section {
        padding: 1rem;
    }

    .login-form-container,
    .welcome-container {
        padding: 1rem 0.5rem;
    }
}

/* Slideshow styles */
.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: slideshow 15s linear infinite;
    z-index: 0;
}

.slideshow-image:nth-child(1) {
    background-image: url('../images/bg1.jpg');
    animation-delay: 0s;
}

.slideshow-image:nth-child(2) {
    background-image: url('../images/bg2.jpg');
    animation-delay: 3s;
}

.slideshow-image:nth-child(3) {
    background-image: url('../images/bg3.jpg');
    animation-delay: 6s;
}

.slideshow-image:nth-child(4) {
    background-image: url('../images/bg4.jpg');
    animation-delay: 9s;
}

.slideshow-image:nth-child(5) {
    background-image: url('../images/bg5.jpg');
    animation-delay: 12s;
}

@keyframes slideshow {
    0%, 20% {
        opacity: 0;
    }
    25%, 45% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Overlay for better text readability */
.branding-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


.branding-section .text-center {
    position: relative;
    z-index: 2; /* Ensure text stays above the slideshow and overlay */
    background: rgba(248, 249, 250, 0.85); /* Light overlay with 70% opacity */
}

.page-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
}

.page-wrapper main {
    width: 100%;
    height: 100%;
}

/* Card styling improvements */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease-in-out;
    margin-bottom: 1rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1rem;
}

/* Button improvements */
.btn {
    font-weight: 500;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Form improvements */
.form-control {
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 103, 31, 0.25);
}

/* Table improvements */
.table {
    --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
}

.table th {
    font-weight: 600;
    border-top: none;
    background-color: #f8f9fa;
}

/* Navbar enhancements */
.navbar {
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-weight: 700;
}

.navbar .nav-link {
    padding: 0.5rem 1rem !important;
}

.navbar .nav-link:hover {
    color: var(--bs-primary) !important;
}
