/* General Reset */
body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", sans-serif;
    background-color: #f8f9fa;
    height: 100%;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Comfortaa", sans-serif;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.7px;
    line-height: 1.2;
    margin-bottom: 15px;
}

/* Labels */
label {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    color: #555;
}

/* Input Fields */
input,
select,
textarea {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    color: #333;
}

.theme-primary {
    background-color: #847444;
    color: white;
}

/* Error Messages */
.invalid-feedback,
.text-danger {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    color: #d9534f;
}

/* Tooltips */
.tooltip {
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    color: #fff;
    background-color: #333;
    border-radius: 5px;
    padding: 5px 10px;
    max-width: 250px;
}

/* Sidebar Text and Steps */
.sidebar .step {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    color: grey;
}

.sidebar .step.active {
    font-weight: 700;
    color: black !important;
}

.button-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.prev-button {
    width: 50%;
    max-width: 200px;
    background-color: grey;
    color: white;
    border: none;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.prev-button:hover {
    background-color: lightgrey;
}

.next-button {
    max-width: 200px;
    width: 50%;
    background-color: #847444;
    color: white;
    border: none;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.next-button:hover {
    background-color: #a39774;
}

#openMapButton {
    background-color: #847444;
    color: white;
    border: none;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#openMapButton:hover {
    color: #000000;
    background-color: #a39774;
}

#close-button {
    background-color: #847444;
    color: white;
    border: none;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#close-button:hover {
    color: #000000;
    background-color: #a39774;
}

/* Shared button styles */
button {
    outline: none;
    box-shadow: none;
}

/* Ensure Inputs Look Clean */
input::placeholder {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    color: #999;
}

/* Modal Content */
.modal-body {
    font-family: "Open Sans", sans-serif;
    color: #333;
}

.tooltip .tooltip-inner {
    text-align: left;
    color: #fff;
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    background-color: #333;
}

.tooltip img {
    border-radius: 8px;
    margin-top: 5px;
    max-width: 100%;
}

/* Ensure the entire viewport is used */
.container-fluid {
    /* height: 100vh; */
    min-height: 100vh;
    overflow-y: auto;
}

/* Sidebar Styling */
.sidebar {
    background-color: white !important;
    color: black;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    border-left: none;
    border-right: 2px solid #847444;
    border-top: none;
    border-bottom: none;
}

/* Company Logo at the Top-Left */
.company-logo {
    align-self: flex-start;
    margin-bottom: 30px;
}

.company-logo img {
    width: 60px;
    max-width: 60px;
    height: auto;
    border-radius: 50%;
}

/* Steps container to align steps neatly below the logo */
.steps-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Step Styling */
.step {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #ccc;
    cursor: pointer;
    min-height: 60px;
    text-align: start;
    width: 100%;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.completed .step-circle {
    background-color: #847444 !important;
    color: white;
}

.active .step-circle {
    background-color: black !important;
    color: white;
}

.step-circle i {
    font-size: 18px;
}

.step i {
    display: none;
}

/* Adjust sidebar layout for smaller screens */
@media (max-width: 767px) {
    .sidebar {
        height: 70px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 10px;
    }

    .company-logo {
        margin: auto;
        justify-content: center;
    }

    .company-logo img {
        width: 50px;
        height: 50px;
    }

    .steps-container {
        display: none;
    }
}

@media (min-width: 768px) {
    .sidebar {
        min-height: 100vh;
        align-items: flex-start;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .step-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
}

@media (max-width: 1024px) {
    .step-circle {
        width: 30px;
        height: 30px;
        border-radius: 50%;
    }
}

/* Form Section Styling */
.form-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    margin: auto;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Align the form title */
.form-title {
    text-align: center;
    margin-block: 20px;
    font-family: "Quicksand", sans-serif;
    font-weight: bold;
    font-size: 40px;
    color: #333;
    margin-bottom: 20px;
}

.sub-title {
    font-weight: 700;
    font-size: 25px;
}

.input-group .select2-container--bootstrap-5 .select2-selection {
    height: calc(2.375rem + 5px);
    border: 2px solid #666;
    border-radius: 0.375rem 0 0 0.375rem;
    padding: 0.375rem 0.75rem;
    box-sizing: border-box;
}

.input-group .select2-selection__rendered {
    line-height: 1.5;
}

.input-group .select2-container {
    width: auto !important;
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Toggle the background color when checked */
input:checked + .slider {
    background-color: #000000;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Hide the default radio button */
.form-check-input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 15px;
    height: 15px;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Checked state */
.form-check-input[type="radio"]:checked {
    background-color: #000000;
    border-color: #000000;
}

/* Hover effect */
.form-check-input[type="radio"]:hover {
    border-color: #999;
}

#imagePreviewContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

#imagePreviewContainer .preview {
    width: 150px;
    height: 225px;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #333;
    overflow: hidden;
}

#imagePreviewContainer .preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#imagePreviewContainer .preview .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ff5b5b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#imagePreviewContainer .preview .remove-btn:hover {
    background-color: #ff0000;
}

.custom-input {
    font-size: 0.9rem;
    padding: 8px;
    border: 2px solid #666;
    border-radius: 5px;
}

.custom-input.is-invalid {
    border-color: #dc3545;
}

.custom-tooltip-wide {
    --bs-tooltip-max-width: 90% !important;
    max-width: 400px !important;
    word-wrap: break-word !important;
    padding: 10px !important;
}

.custom-tooltip-wide h6 {
    color: #fff !important;
    font-size: 1rem !important;
}

@media (max-width: 576px) {
    .custom-tooltip-wide {
        font-size: 0.9rem !important;
        --bs-tooltip-max-width: 100% !important;
        padding: 8px !important;
    }

    .custom-tooltip-wide h6 {
        font-size: 0.95rem !important;
    }

    #map {
        width: 100%;
        height: 300px;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    #loader {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }

    .loader_modal {
        background-color: white;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 300px;
        width: 90%;
        text-align: center;
    }
}

/* Ensure tooltip background is solid */
.tooltip.show {
    opacity: 1 !important;
}

/* Form Container Styles */
.form-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Form Title Styles */
.form-title {
    font-size: 2rem;
    color: #847444;
    margin-bottom: 1.5rem;
}

/* Login Button Styles */
.login-button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background-color: #847444;
    border: none;
    color: white;
}

.login-button:hover {
    background-color: #6a5d36;
    color: white;
}

/* Navigation Button Styles */
.button-wrapper {
    gap: 1rem;
}

.prev-button,
.next-button {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .form-container {
        padding: 0.5rem;
    }

    .form-title {
        font-size: 1.5rem;
        margin-top: 3rem;
    }

    .login-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .prev-button,
    .next-button {
        min-width: 100px;
        padding: 0.6rem 1rem;
    }

    /* Adjust form section padding */
    .form-section {
        padding: 1rem 0.5rem;
    }

    /* Make inputs more touch-friendly */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
}
