/* GENERAL */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    background-color: #F1F4F8;
    font-family: 'Catamaran', sans-serif;
    color: #12263f;
}

p {
    font-size: 20px;
}

a {
    color: #0259BA;
}

a.disabled {
    pointer-events: none;
    cursor: default;
}

.btn {
    font-size: 20px;
}

.btn-primary {
    background-color: #0259BA !important;
    border-color: #2a0f38 !important;
}

.btn-primary:hover {
    background-color: white !important;
    color: #0259BA !important;
}

.btn-outline-primary {
    border-color: #0259BA !important;
    color: #0259BA !important;
}

.btn-outline-primary:hover {
    border-color: #0259BA !important;
    background-color: #0259BA !important;
    color: white !important;
}

/* FORM CONTROLS */
tbody > tr > td, .form-control, .form-control-file {
    font-family: sans-serif !important;
}

small {
    font-weight: 300 !important;
}

.form-control-label {
    font-weight: 600 !important;
    letter-spacing: 1.1px;
    font-size: 15px;
    line-height: 18px;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 1200px) {
    .container {
        max-width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    #existing_graphics .thumbnail {
        width: 100% !important;
        max-width: 100%; /* Ensure no overflow */
        margin: 0; /* Edge-to-edge alignment */
        margin-top: 20px;
    }

    .thumbnail img,
    .thumbnail video {
        max-width: 100%;
        min-width: 350px;
    }


    .thumbnail_button {
        max-width: 100%;
        min-width: 350px;
        min-height: 350px;
    }
}

/* EXISTING GRAPHICS */
#existing_graphics {
    width: 100%;
    max-width: 100%;
}

#existing_graphics .thumbnail {
    min-width: 200px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    margin: 8px;
}

.thumbnail_button {
    margin-top: 24px;
    width: 200px;
    height: 200px;
    margin-left: 12px;
    border: 2px solid lightgrey;
}

/* Style radio buttons without space and highlight selected thumbnail */
#existing_graphics input[type="radio"] {
    margin-top: -15px;
    transform: scale(1.3);
    padding: 0;
    opacity:0;
    position: absolute;
}

.thumbnail img,
.thumbnail video {
    max-width: 200px;
    width: 100%;
    height: auto;
    border: 1px solid lightgrey;
    margin: 0;
    transition: border 0.2s ease; /* Smooth transition for border change */
}

.thumbnail.selected img,
.thumbnail.selected video {
    border: 15px solid #0259BA; /* Blue border */
}

.thumbnail {
    cursor: pointer;
}

.selected .graphic-name {
    color: blue;
    font-weight: 700;
}




.thumbnail small {
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1;
}

/* TEXT COLORS */
.text-primary {
    color: #0259BA !important;
}

.text-secondary {
    color: #95aac9 !important;
}

.text-very-muted {
    color: #aaaaaa !important;
}

/* HEADINGS */
h1, h2, h3, h4, h5, h6 {
    color: #12263f;
    font-weight: 500;
}

.h1, h1 {
    font-size: 1.8rem;
}

.h2, h2 {
    font-size: 1.6rem;
}

.h3, h3 {
    font-size: 1.4rem;
}

.h4, h4 {
    font-size: 1.2rem;
}

.h5, h5 {
    font-size: 1.0rem;
}

.h6, h6 {
    font-size: 0.8rem;
}

/* TABLE STYLING */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

th {
    vertical-align: middle !important;
}

/* DATATABLE STYLING */
.dataTable > thead > tr > th, .dataTable > tbody > tr > td {
    font-size: 14px;
    vertical-align: middle;
}

.dataTables_filter {
    margin-left: 0 !important;
}

.dataTables_length {
    float: left;
    margin-right: 15px;
}

.dataTables_info {
    float: left;
    font-size: 14px;
    margin-top: 12px;
    color: #aaaaaa;
}

.dataTables_paginate {
    float: right;
}

.pagination {
    padding-top: 10px;
    font-size: 14px;
    color: #aaaaaa;
}

.paginate_button > a {
    padding: 3px 8px;
}

.page-item.active .page-link {
    color: #0259BA;
    background-color: #ffffff !important;
}

.page-item .page-link {
    color: #aaaaaa !important;
}

.dataTables_wrapper table {
    margin-bottom: 8px;
    border-bottom: 1px dotted #e3e1e1;
}

.dataTables_wrapper table > thead > tr > th {
    border-top: 1px solid #dfdcdc;
    border-left: 1px solid white;
    background-color: #e8e7e7;
    font-weight: 700;
    text-align: center;
}

.dataTables_wrapper table > tbody > tr > td {
    border-left: 1px solid #ecebeb;
}

.dataTable .text-link {
    text-align: center;
    text-decoration: underline;
    color: #0259BA;
    font-size: 12px;
}

/* BUTTONS */
.dt-buttons {
    float: right;
    margin-top: 18px;
}

.buttons-print, .buttons-csv, .buttons-excel {
    background-color: white;
    color: #aaaaaa;
    border-color: #aaaaaa;
    padding-top: 4px;
    padding-bottom: 5px;
    font-size: 14px;
}

.dataTable_new_crud_button {
    display: inline-block;
    float: right;
    margin-top: 5px;
}

/* NAVIGATION */
.navbar {
    padding-top: 0.05rem !important;
    padding-bottom: 0.15rem !important;
}

.nav-link {
    font-size: 20px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f4f2f2;
}

#navbarCollapse > ul > li > a {
    font-weight: 300;
}

#navbarCollapse > ul > li > a:hover, .nav-link:hover {
    text-decoration: underline;
}

#navbarCollapse .active {
    color: #0259BA !important;
}

/* CUSTOM SWITCH STYLING */
.custom-control {
    margin-top: 15px;
}

.custom-switch.custom-switch .custom-control-label {
    padding-left: 1.2rem;
    padding-bottom: 0.8rem;
    padding-top: 0.22rem;
    font-size: 18px;
}

.custom-switch.custom-switch .custom-control-label::before {
    height: 1.5rem;
    width: calc(2rem + 0.75rem);
    border-radius: 3rem;
}

.custom-switch.custom-switch .custom-control-label::after {
    width: calc(1.5rem - 4px);
    height: calc(1.5rem - 4px);
    border-radius: calc(2rem - (1.5rem / 2));
}

.custom-switch.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(calc(1.5rem - 0.25rem));
}

/* ICON ROTATION */
.rotate {
    transform: rotate(-90.0deg);
}

.dot {
    top: 2px;
    height: 13px;
    width: 13px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #333333;
}

.colour_square {
    border-radius: 5px;
    height: 25px;
    width: 25px;
    border: 1px solid lightgrey;
    margin: auto;
}

*, *::before, *::after {
    box-sizing: border-box;
}
