/* Common Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0; /* Ensure no default padding interferes */
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Full viewport height */
}
.wrapper {
    flex: 1 0 auto; /* Grows vertically to push footer down */
    width: 100%; /* Ensures horizontal responsiveness */
    max-width: 100%; /* Prevents overflow */
}
footer.footer {
    flex-shrink: 0; /* Stays at bottom */
    width: 100%; /* Matches body width */
    padding: 1rem calc(var(--bs-gutter-x) * 0.5); /* Aligns with container */
}
/* Ensure container respects Hope UI responsive widths */
.container {
    width: 100%;
    max-width: 1320px; /* Matches Hope UI’s max at 1400px */
    margin-right: auto;
    margin-left: auto;
}
.navbar-brand span {
    font-size: 0.9rem;
    color: var(--bs-gray);
    margin-left: 8px;
}
.card-header {
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}
.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
}
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--bs-gray);
}
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(58, 87, 232, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .navbar-nav {
        padding: 0.5rem 0;
    }
    .navbar-nav .nav-item {
        border-bottom: 1px solid var(--bs-border-color);
    }
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
}
.card .card-header {
    /* padding-bottom: 20px!important; */
    background-color: #ffffff!important;
}
#get-started-card .card-header {
    border-radius: var(--bs-card-border-radius) var(--bs-card-border-radius) var(--bs-card-border-radius) var(--bs-card-border-radius); /* 0.5rem on all corners */
    border-bottom: none; /* Optional: Remove bottom border if you want a seamless look */
}
/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%; /* Overrides Bootstrap’s max-width */
        margin-left: 0;  /* Removes auto margins */
        margin-right: 0;
    }
    .container.mt-5 {
        margin-top: 1rem; /* Reduce top margin on mobile for less vertical space */
    }
}
@media (max-width: 768px) {
    .card {
        margin-left: 0.5rem;  /* Small margin for breathing room */
        margin-right: 0.5rem; /* Keeps it from touching the edge */
        border-radius: 0;     /* Optional: Removes rounded corners for a full-width feel */
    }
    .card-body.p-4 {
        padding: 1rem; /* Reduce padding from 1.5rem to 1rem on mobile */
    }
    .card.mb-4 {
        margin-bottom: 1rem; /* Reduce from 1.5rem to 1rem */
    }
}
@media (max-width: 768px) {
    .search-bar {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    #template-search-form .input-group {
        width: auto; /* Overrides previous full-width setting to fit naturally */
    }
    .filter-container {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    .filter-input {
        flex: 1 1 100%; /* Ensures inputs stack and take full width */
        min-width: 0;   /* Prevents overflow in flex context */
    }
    .table-responsive {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
}
/* Infinite Mode Icon Styling */

.infinite-icon {
    position: relative;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}
.infinite-icon .infinite-svg {
    width: 5rem;
    height: 2rem;
    transition: transform 0.3s ease; /* Smooth scaling */
}
.infinite-icon.holding .infinite-svg {
    animation: stretch 1.5s linear forwards; /* Stretch during hold */
}
.infinite-icon.btn-outline-secondary {
    background-color: transparent;
    border-color: var(--bs-secondary);
}
.infinite-icon.btn-secondary {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}
.infinite-icon.active .infinite-path {
    stroke: var(--bs-white);
    stroke-width: 6;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}



.infinite-icon .infinite-bg {
    fill: none;
    stroke: var(--bs-gray-300); /* Light grey background path */
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-miterlimit: 10;
}
.infinite-icon .infinite-path {
    fill: none;
    stroke: var(--bs-secondary); /* Teal when inactive */
    stroke-width: 4; /* Default width when inactive */
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-miterlimit: 10;
    stroke-dasharray: 20 324; /* Adjusted for new path length, smaller initial dash */
    stroke-dashoffset: 0;
    animation: traceInfinity 1.5s ease-in-out infinite;
}
.infinite-icon.active .infinite-path {
    stroke: var(--bs-white); /* White when active */
    stroke-width: 6; /* Thicker stroke when active */
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8)); /* Subtle white glow */
}
@keyframes stretch {
    0% {
        transform: scaleX(1); /* Normal size */
    }
    80% {
        transform: scaleX(1.3); /* Stretch horizontally */
    }
    100% {
        transform: scaleX(1); /* Snap back or hold stretched if toggled */
    }
}
@keyframes traceInfinity {
    0% {
        stroke-dasharray: 20 324; /* Start small */
        stroke-dashoffset: 0;
    }
    25% {
        stroke-dasharray: 60 324; /* Grow smoothly */
        stroke-dashoffset: -81; /* Quarter path */
    }
    50% {
        stroke-dasharray: 60 324;
        stroke-dashoffset: -162; /* Half path */
    }
    75% {
        stroke-dasharray: 60 324;
        stroke-dashoffset: -243; /* Three-quarters path */
    }
    100% {
        stroke-dasharray: 20 324; /* Shrink back */
        stroke-dashoffset: -324; /* Full path, seamless loop */
    }
}

