/* ################# Custom Control for Step by Step ################# */
:root {
    --step-box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}

.custom-control {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    cursor: pointer;
    overflow: visible;
    transition: all 0.3s ease;
}

.custom-control .image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    width: 100%;
    box-shadow: var(--step-box-shadow);
}

.custom-control.custom-radio .image-wrapper {
    border-radius: 50%;
}

.custom-control img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.control-label {
    display: block;
    text-align: center;
    font-size: 1rem;
    margin-top: .5rem;
}

.control-label.disabled {
    color: #6c757d;
}

.custom-control:hover img {
    transform: scale(1.1);
}

.custom-control input[type="checkbox"],
.custom-control input[type="radio"] {
    display: none;
}

.custom-control .checkmark {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    background-color: white;
    border-radius: 18px;
    border: 2px solid var(--bs-blue);
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-control.custom-radio .checkmark {
    bottom: 6%;
    right: 6%;
}

/* Add FontAwesome icon when checked */
.custom-control .checkmark::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    color: transparent;
    font-size: 1.25rem;
}

/* Show the check icon on hover */
.custom-control:hover .checkmark::before {
    color: var(--bs-blue);
}

/* Change colors when checked */
.custom-control input[type="checkbox"]:checked+.image-wrapper+.checkmark,
.custom-control input[type="checkbox"]:checked~.checkmark,
.custom-control input[type="radio"]:checked+.image-wrapper+.checkmark,
.custom-control input[type="radio"]:checked~.checkmark {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
}

/* Show the check icon when checked */
.custom-control input[type="checkbox"]:checked+img+.checkmark::before,
.custom-control input[type="checkbox"]:checked~.checkmark::before,
.custom-control input[type="radio"]:checked+img+.checkmark::before,
.custom-control input[type="radio"]:checked~.checkmark::before {
    color: white;
}

/* Disabled state styling */
.custom-control.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-control.disabled img {
    filter: grayscale(70%);
}

.custom-control.disabled .checkmark {
    display: none;
}

/* Ensure hover effects are disabled on disabled controls */
.custom-control.disabled:hover img {
    transform: none;
}

/* Text option for custom controls */
.custom-control .text-wrapper {
    border-radius: 16px;
    background-color: var(--bs-gray);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--step-box-shadow);
}

.custom-control.custom-radio .text-wrapper {
    border-radius: 50%;
}

/* Text styling inside text wrapper */
.custom-control .text-wrapper .control-text {
    font-weight: 400;
    color: #FFFFFF;
    font-size: 3.75rem;
    line-height: 1.2;
    transition: all .3s ease;
}

.custom-control:hover .text-wrapper .control-text {
    font-size: 2.75rem;
}

/* Disabled state for text options */
.custom-control.disabled .text-wrapper {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.custom-control.disabled .text-wrapper .control-text {
    color: #6c757d;
}

.custom-control.disabled:hover .text-wrapper {
    background-color: #e9ecef;
    /* No change on hover when disabled */
}


/* ########################## Tabbed Navigation ########################## */
/* Full width tabs with equal spacing */
.clean-tabs {
    border-bottom: none;
    display: flex;
    width: 100%;
    gap: .25rem;
    margin-bottom: 2rem;
}

.clean-tabs .nav-item {
    margin-bottom: 0;
    margin-right: 0;
    flex: 1;
}

.clean-tabs .nav-link {
    border: none;
    background: transparent;
    color: #747474;
    padding: 0.5rem 0rem 1rem 0rem;
    position: relative;
    font-weight: 500;
    font-size: .8rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    text-align: start;
    width: 100%;
    letter-spacing: 1px;
    cursor: default !important;
}

/* Hover state */
.clean-tabs .nav-link:hover {
    color: #495057;
    border: none;
    background: transparent;
}

/* Active state */
.clean-tabs .nav-link.active {
    color: var(--bs-body-color);
    border: none;
    background: transparent;
}

/* Underline for all tabs */
.clean-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: #dee2e6;
    border-radius: 900px;
    transition: background-color 0.3s ease;
}

/* Colored underline for active tab */
.clean-tabs .nav-link.active::after {
    background-color: var(--bs-info);
}


/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .custom-control .checkmark {
        bottom: 3%;
        right: 3%;
        width: 15%;
        height: 15%;
        border-radius: 50%;
    }
    
    .custom-control.custom-radio .checkmark {
        bottom: 7.5%;
        right: 7.5%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .custom-control .checkmark::before {
        font-size: 1.35rem;
    }
    
    .custom-control .checkmark {
        bottom: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 3px solid var(--bs-blue);
    }
    
    .custom-control.custom-radio .checkmark {
        bottom: 6%;
        right: 6%;
    }
    
    .clean-tabs {
        margin-bottom: 4rem;
    }
    
    .control-label {
        font-size: 1.15rem;
        margin-top: 0;
    }
    
    .custom-control:hover .text-wrapper .control-text {
        font-size: 4.25rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {  }

/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {  }

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {  }


@media (max-width: 768px) {
    .custom-control .text-wrapper .control-text {
        font-size: 2.5rem;
    }

    .clean-tabs {
        flex-wrap: nowrap;
        /* Prevent wrapping */
        overflow-x: auto;
        /* Enable horizontal scrolling */
        overflow-y: hidden;
        /* Hide vertical scrollbar */
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        scrollbar-width: none;
        /* Hide scrollbar on Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar on IE/Edge */
        padding-bottom: 5px;
        /* Add some padding to prevent cut-off */
    }

    /* Hide webkit scrollbar */
    .clean-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Make tab items fixed width on mobile */
    .clean-tabs .nav-item {
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
        /* Adjust this value based on your content */
    }
}