html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--bs-primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/login.png');
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-control-lg {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 16px;
}

.form-control-lg:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary-login {
    background: linear-gradient(135deg, #667eea 0%, #FFFFFF 100%);
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.login-footer {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.catalog-viewer {
    height: auto;
    overflow: scroll;
}

.sidebar-content {
    background-color: #f8f9fa;
}

.part-drawing-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.part-drawing-item:hover {
    border-left-color: #0d6efd;
    background-color: #e7f3ff;
}

.part-drawing-item.active {
    border-left-color: #0d6efd;
    background-color: #e7f3ff;
    font-weight: 500;
}

.parts-list {
    max-height: 400px;
    overflow-y: auto;
}

.content-area {
    overflow-y: auto;
    background-color: #ffffff;
}

.card {
    box-shadow: 0 2px 4px grey;
    border: none;
}

.card:hover {
    box-shadow: 0 2px 4px var(--bs-primary);
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.badge {
    font-size: 0.75em;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}
.family-card {
    transition: transform 0.2s ease-in-out;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.family-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.models-preview {
    max-height: 60px;
    overflow: hidden;
}

.drawing-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 15px;
    background-color: #f8f9fa;
    position: relative;
    overflow: visible;
}

.drawing-image {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
}

.hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    z-index: 1;
}

.hotspot:hover {
    animation: pulse 1s infinite;
}

.nav-pills .nav-link {
    color: #495057;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.nav-pills .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
}

.nav-pills .nav-link:hover {
    background-color: #e9ecef;
}

.badge {
    font-size: 0.8em;
}

.modal-header {
    border-bottom: 2px solid var(--bs-primary);
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

.card-header {
    font-weight: 600;
}

.table-responsive {
    border-radius: 0.375rem;
}

.alert {
    border-radius: 0.375rem;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* SubAssembly modal specific styles */
.subassembly-details .info-item {
    margin-bottom: 1rem;
}

.subassembly-details .info-item label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    display: block;
}

.subassembly-details .info-value {
    font-size: 1rem;
}

.subassembly-details .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.subassembly-details .alert-light {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
}

.card-header .fas {
    font-size: 1rem;
}

/* Responsive adjustments */

.subassembly-details .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

    .loading-overlay.show {
        display: flex;
    }

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-spinner-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #fff;
    border-radius: 50%;
    animation: loading-spinner-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #fff transparent transparent transparent;
}

.loading-spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
}

.loading-spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
}

.loading-spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes loading-spinner-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-item.active .page-link {
    background-color: var(--bs-secondary);
    border-color: var(--bs-primary);
}
.page-item.active .page-link {
    color: var(--bs-primary)
}

/* Product Image Carousel Styles */
.thumbnail-item {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.thumbnail-item img {
    transition: all 0.2s ease-in-out;
    border: 2px solid #dee2e6;
}

.thumbnail-item:hover img {
    border-color: var(--bs-secondary);
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail-item.active img {
    border-color: var(--bs-primary);
    border-width: 3px;
    box-shadow: 0 2px 8px rgba(44, 30, 28, 0.3);
}

/* Nested Dropdown Styles */
#categoriesMenu {
    max-height: 400px;
    overflow-y: auto;
}

/* Nested dropdown container */
.dropdown-menu .nested-dropdown {
    position: relative;
}

/* Nested dropdown menu positioning - uses fixed positioning set by JavaScript */
.dropdown-menu .nested-dropdown > .dropdown-menu {
    /* position, top, and left are set dynamically by JavaScript */
    display: none;
    z-index: 1050; /* Ensure it appears above other elements */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Add shadow for separation */
}

.dropdown-menu .nested-dropdown > .dropdown-menu.show {
    display: block;
}

/* Dropdown toggle arrow for nested items */
.nested-dropdown > .dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    vertical-align: middle;
    content: "";
    border-top: .3em solid transparent;
    border-right: 0;
    border-bottom: .3em solid transparent;
    border-left: .3em solid;
}

/* Hover effect for nested dropdown items */
.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 2rem;
}

/* Nested menus appear independently, no overflow issues */
.dropdown-menu .dropdown-menu {
    overflow-y: visible;
}

/* Legacy dropend support (kept for compatibility) */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-menu .dropend {
    position: relative;
}

.dropdown-menu .dropend > .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: -1px;
    display: none;
    z-index: 1050;
}

.dropdown-menu .dropend > .dropdown-menu.show {
    display: block;
}

.dropend .dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    vertical-align: middle;
    content: "";
    border-top: .3em solid transparent;
    border-right: 0;
    border-bottom: .3em solid transparent;
    border-left: .3em solid;
}
