/* Customize the label (the container) */
.cb-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    font-size: 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide the browser's default checkbox */
.cb-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
}

/* On mouse-over, add a grey background color */
.cb-container:hover input ~ .checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.cb-container input:checked ~ .checkmark {
    background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.cb-container input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.cb-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* -- LABELS LEFT AND RIGHT -- --*/
.switch-label-left {
    margin-right: 10px;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.switch-label-right {
    margin-left: 10px;
    font-weight: bold;
    min-width: 80px;
    text-align: left;
}


/* --  -- TOGGLE SWITCH -- --*/
/* --  -- TOGGLE SWITCH -- --*/
/* --  -- TOGGLE SWITCH -- --*/

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide the default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(156, 163, 175, 0.2); /* bg-muted-foreground/20 */
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: #fafcff; /* bg-foreground */
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: rgba(91, 98, 249, 0.4); /* bg-primary/40 (#5b62f9 with 40% opacity) */
}

input:focus + .slider {
    box-shadow: 0 0 1px rgba(91, 98, 249, 0.4);
}

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

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.center-v {
    margin: auto 0 auto 40px;
}

@media (max-width: 480px) {
    .center-v {
        margin: auto auto;
    }
    .switch-label-left {
        margin-right: 6px;
        font-size: 12px;
    }

    .switch-label-right {
        margin-left: 6px;
        font-size: 12px;
    }
}


/* Custom responsive orientation classes for military service photos */
.svc-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

.svc-photo-figure {
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(229, 231, 235, 0.15);
}

/* Portrait (images 0 & 1) */
.svc-photo-figure.portrait .svc-photo-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
}

/* Landscape (images 2 & 3) */
.svc-photo-figure.landscape .svc-photo-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.svc-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}

.athlete-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.three {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Centers the caption text */
    aspect-ratio: 3/4;
    width: 100%; /* Ensures the figure takes full width of the cell */
}

.athlete-photo {
    width: 78%;
    border-radius: 4px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    object-position: center !important;
    align-items: center; /* Centers items horizontally */
    justify-content: center; /* Centers items vertically if height is applied */
}

/* Max height constraints depending on screen width */
@media screen and (max-width: 640px) {
    .svc-photo-figure.portrait .svc-photo-aspect {
        max-height: 250px;
    }
    .svc-photo-figure.landscape .svc-photo-aspect {
        max-height: 150px;
    }
    .athlete-photo {
        width: 100%;
    }
}

@media screen and (min-width: 641px) and (max-width: 1024px) {
    .svc-photo-figure.portrait .svc-photo-aspect {
        max-height: 380px;
    }
    .svc-photo-figure.landscape .svc-photo-aspect {
        max-height: 220px;
    }
}

@media screen and (min-width: 1025px) {
    .svc-photo-figure.portrait .svc-photo-aspect {
        max-height: 480px;
    }
    .svc-photo-figure.landscape .svc-photo-aspect {
        max-height: 280px;
    }
}

