:root {
    --background-colour: #f8f9fa;
    --border-colour: #dee2e6;
    --entry-field: #ffffff;
    --remove-colour: #dc3545;
    --remove-hover: #a02834;
    --night-colour: #000000;
}

.form-section {
    background-color: var(--background-colour);
    border: 1px solid var(--border-colour);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.form-control,
.form-select {
    border: 1px solid var(--border-colour);
    padding: 0.5rem;
}

.form-check {
    margin: 2px 0;
    position: relative;
}

.form-check-label {
    display: block;
    margin-left: 5px;
}

.checkbox-group {
    padding: 15px;
    border-radius: 4px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

.three-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .three-column-layout {
        grid-template-columns: 1fr;
    }
}

.four-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 992px) {
    .four-column-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .four-column-layout {
        grid-template-columns: 1fr;
    }
}

.medication-entry {
    border: 1px solid var(--border-colour);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background-color: var(--entry-field);
    position: relative;
}

.remove-medication {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--remove-colour);
    cursor: pointer;
}

.remove-medication:hover {
    color: var(--remove-hover);
}

.add-medication-btn {
    margin-top: 15px;
}

.goal-entry {
    border: 1px solid var(--border-colour);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background-color: var(--entry-field);
    position: relative;
}

.remove-goal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--remove-colour);
    cursor: pointer;
}

.remove-goal:hover {
    color: var(--remove-hover);
}

.add-goal-btn {
    margin-top: 15px;
}

.checkbox-group-columns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px;
}

.user-type-section {
    border: 1px solid var(--border-colour);
    border-radius: 8px;
    background-color: var(--background-colour);
}

/* Select2 custom styling */
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--border-colour);
    border-radius: 0.375rem;
    min-height: 38px;
}

.select2-container {
    width: 100% !important;
}

/* Force Select2 dropdowns to open below */
.force-below.select2-dropdown {
    top: auto !important;
    bottom: auto !important;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-color: var(--border-colour);
}

.select2-container--open .select2-dropdown--below {
    border-top: 1px solid var(--border-colour);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Prevent horizontal scrollbars when dropdown is open */
body.select2-dropdown-open {
    overflow-x: hidden !important;
}

/* LGA option styling */
.lga-option {
    background-color: #e8f4fd !important;
    color: #0066cc !important;
    font-weight: bold !important;
}

/* Hourly Availability Styles */
#availability_table {
    font-size: 0.8rem;
    max-width: 750px;
    table-layout: fixed;
    width: 100%;
}

#availability_table th {
    text-align: center;
    font-weight: 600;
    background-color: var(--background-colour);
    padding: 4px;
    max-width: 70px;
}

.availability-cell {
    width: 60px;
    height: 30px;
    min-width: 60px;
    min-height: 30px;
    max-width: 70px;
    max-height: 30px;
    text-align: center;
    padding: 2px;
    cursor: pointer;
    border: 1px solid var(--border-colour);
    vertical-align: middle;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.time-label {
    font-weight: 600;
    background-color: var(--background-colour);
    text-align: center;
    width: 60px;
    max-width: 70px;
    padding: 4px;
}

.time-label.night-hours {
    background-color: var(--night-colour);
    color: var(--entry-field);
}

.time-label.day-hours {
    background-color: #ffc107;
    color: black;
}

.time-label.evening-hours {
    background-color: #1e3a8a;
    color: var(--entry-field);
}

.period-label {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    width: 40px;
    max-width: 40px;
    padding: 8px 4px;
    line-height: 1.2;
    font-size: 1.05rem;
}

.period-label.night-hours {
    background-color: var(--night-colour);
    color: var(--entry-field);
}

.period-label.day-hours {
    background-color: #ffc107;
    color: black;
}

.period-label.evening-hours {
    background-color: #1e3a8a;
    color: var(--entry-field);
}

.period-label .time-range {
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 4px;
}

.availability-cell:hover {
    background-color: #e9ecef;
}

.availability-cell.selected {
    background-color: #007bff;
    color: var(--entry-field);
}

.availability-cell.filled {
    background-color: #28a745 !important;
    color: var(--entry-field) !important;
}

.availability-cell.available {
    background-color: #28a745 !important;
    color: var(--entry-field) !important;
}

.availability-cell.night-hours {
    background-color: var(--night-colour);
    color: var(--entry-field);
}

.availability-cell.day-hours {
    background-color: #ffc107;
    color: black;
}

.availability-cell.evening-hours {
    background-color: #1e3a8a;
    color: var(--entry-field);
}

.rate-display {
    font-size: 0.7rem;
    font-weight: 600;
    pointer-events: none;
}

.rate-pill {
    display: inline-block;
    background-color: #6c757d;
    color: var(--entry-field);
    padding: 4px 8px;
    margin: 2px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rate-pill:hover {
    background-color: #5a6268;
}

.rate-pill.active {
    background-color: #007bff;
}

.rate-pill .remove-pill {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

.rate-pill .remove-pill:hover {
    color: #ffc107;
}

/* Custom Range Slider Styling */
.slider-container {
    position: relative;
    width: 100%;
    height: 1.4rem;
    margin: 0.5rem 0;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: #6c757d;
    border-radius: 0.25rem;
    transform: translateY(-50%);
    z-index: 1;
}

.custom-range {
    position: relative;
    width: 100%;
    height: 1.4rem;
    padding: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    z-index: 2;
    cursor: pointer;
}

.custom-range:focus {
    outline: none;
}

/* WebKit Browsers (Chrome, Safari, Edge) */
.custom-range::-webkit-slider-track {
    width: 100%;
    height: 1.4rem;
    background: transparent;
    border: none;
    outline: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 1.4rem;
    width: 1.4rem;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid var(--entry-field);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.custom-range::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Mozilla Firefox */
.custom-range::-moz-range-track {
    width: 100%;
    height: 1.4rem;
    background: transparent;
    border: none;
    outline: none;
}

.custom-range::-moz-range-thumb {
    height: 1.4rem;
    width: 1.4rem;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid var(--entry-field);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.custom-range::-moz-range-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Internet Explorer */
.custom-range::-ms-track {
    width: 100%;
    height: 1.4rem;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.custom-range::-ms-fill-lower,
.custom-range::-ms-fill-upper {
    background: transparent;
}

.custom-range::-ms-thumb {
    height: 1.4rem;
    width: 1.4rem;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid var(--entry-field);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

.custom-range::-ms-thumb:hover {
    background: #0056b3;
}

/* Public Visibility Checkbox Styles */
.visibility-checkbox {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    font-size: 0.875rem;
    color: #6c757d;
}

.visibility-checkbox input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.visibility-checkbox label {
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.form-label-with-visibility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.form-label-text {
    flex: 0 0 auto;
}

/* Sticky Save Button Styles */
.sticky-submit-section {
    position: fixed;
    bottom: 20px;
    right: 40px;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1050;
    width: auto;
}

.sticky-submit-section .btn {
    margin: 0;
    min-width: 180px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 25px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
}

.sticky-submit-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Remove body padding since button is now in corner */
body.sticky-button-active {
    padding-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sticky-submit-section {
        bottom: 15px;
        right: 35px;
    }

    .sticky-submit-section .btn {
        min-width: 160px;
        font-size: 0.9rem;
        padding: 12px 20px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .sticky-submit-section {
        bottom: 10px;
        right: 30px;
    }

    .sticky-submit-section .btn {
        min-width: 140px;
        font-size: 0.85rem;
        padding: 10px 16px;
        border-radius: 20px;
    }
}