/* ===================================================================
   UTILITIES/MISC.CSS
   Miscellaneous Utility Classes
   =================================================================== */
/* ===== 7. UTILITY CLASSES ===== */

/* ----- 7.1 Positioning ----- */
.p-relative { position: relative; }
.p-absolute { position: absolute; }
.p-fixed  { position: fixed; }

/* ----- 7.2 Backgrounds ----- */
.background-transparent,
.bg-transparent,
.bg-transparent-hover:hover {
    background: transparent !important;
}

/* ----- 7.3 Spacing ----- */

/* Base Spacing */
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.pb-0 { padding-bottom: 0; }
.pt-0 { padding-top: 0; }

/* Custom Spacing */
.pt-3-5 { padding-top: 0.75rem; }
.pe-3-5 { padding-right: 0.75rem; }
.pb-3-5 { padding-bottom: 0.75rem; }
.ps-3-5 { padding-left: 0.75rem; }
.px-3-5 { padding: 0 0.75rem; }
.py-3-5 { padding: 0.75rem 0; }

/* Negative Margins */
.mt-n1 { margin-top: -0.25rem; }

/* Specific Margin Utilities */
.mt-3-5 {
    margin-top: 12px !important;
    margin-top: 0.75rem !important;
}

.me-3-5 {
    margin-right: 12px !important;
    margin-right: 0.75rem !important;
}

.mb-3-5 {
    margin-bottom: 12px !important;
    margin-bottom: 0.75rem !important;
}

.ms-3-5 {
    margin-left: 12px !important;
    margin-left: 0.75rem !important;
}

/* ----- 7.4 Responsive Spacing ----- */
/* Small devices (≥576px) */
@media (min-width: 576px) {
    .mb-sm-0 { margin-bottom: 0; }
    .mt-sm-0 { margin-top: 0; }
    .pb-sm-0 { padding-bottom: 0; }
    .pt-sm-0 { padding-top: 0; }
}

/* Medium devices (≥768px) */
@media (min-width: 768px) {
    .mb-md-0 { margin-bottom: 0; }
    .mt-md-0 { margin-top: 0; }
    .pb-md-0 { padding-bottom: 0; }
    .pt-md-0 { padding-top: 0; }
}

/* Large devices (≥992px) */
@media (min-width: 992px) {
    .mb-lg-0 { margin-bottom: 0; }
    .mt-lg-0 { margin-top: 0; }
    .pb-lg-0 { padding-bottom: 0; }
    .pt-lg-0 { padding-top: 0; }
}

/* Extra large devices (≥1200px) */
@media (min-width: 1200px) {
    .mb-xl-0 { margin-bottom: 0; }
    .mt-xl-0 { margin-top: 0; }
    .pb-xl-0 { padding-bottom: 0; }
    .pt-xl-0 { padding-top: 0; }
}


/* ===== 82. ANTI-GLITCH STYLES ===== */

/* ----- 82.1 Loaded State ----- */
body.anti-glitch.loaded {
    opacity: 1;
    visibility: visible;
}

/* ----- 82.2 Loading Overlay (Initial State) ----- */
body.anti-glitch .loading-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* ----- 82.3 Loading Overlay (Loaded State) ----- */
body.anti-glitch.loaded .loading-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ===== 86. UTILITY CLASSES ===== */

/* ----- 86.1 Text Utilities ----- */
.hide-text {
    display: block;
    text-indent: -9999px;
    width: 0;
    height: 0;
}

/* ----- 86.2 Fixed Width Utilities ----- */
.w-100 {
    width: 100% !important;
}

.w-400 {
    width: 400px !important;
}

.w-450 {
    width: 450px !important;
}

.w-500 {
    width: 500px !important;
}

/* ----- 86.3 Percentage Width Utilities ----- */
.w-25-percent {
    width: 25% !important;
}

.w-50-percent {
    width: 50% !important;
}

.w-75-percent {
    width: 75% !important;
}

.w-100-percent {
    width: 100% !important;
}

/* ===== 95. VISUAL UTILITIES ===== */

/* ----- 95.1 Opacity ----- */
.opacity-0 {
    opacity: 0 !important;
}

.opacity-25 {
    opacity: 0.25 !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

/* ----- 95.2 Visibility ----- */
.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

/* ===== 96. BACKGROUND UTILITIES ===== */

/* ----- 96.1 Background Colors ----- */
.bg-transparent {
    background-color: transparent !important;
}

.bg-white {
    background-color: #fff !important;
}

/* ----- 96.2 Theme Colors ----- */
.bg-primary {
    background-color: #007bff !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* ----- 96.3 Neutral Colors ----- */
.bg-dark {
    background-color: #343a40 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* ===== 115. COPY TO CLIPBOARD ===== */

/* ----- 115.1 Base Button ----- */
.copy-to-clipboard-wrapper .btn {
    position: relative;
}

/* ----- 115.2 Tooltip ----- */
.copy-to-clipboard-wrapper .btn:before {
    content: 'Copy to Clipboard';
    position: absolute;
    top: -41px;
    left: 50%;
    background: #212121;
    border-radius: 4px;
    transform: translate3d(-50%, 0, 0);
    opacity: 0;
    display: none;
    transition: ease opacity 300ms;
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 12px;
    font-size: 0.75rem;
    z-index: 10;
}

/* ----- 115.3 Tooltip Arrow ----- */
.copy-to-clipboard-wrapper .btn:after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid #212121;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    transform: translate3d(-50%, 0, 0);
    opacity: 0;
    display: none;
    transition: ease opacity 300ms;
}

/* ----- 115.4 Hover & Active States ----- */
.copy-to-clipboard-wrapper .btn:hover:before,
.copy-to-clipboard-wrapper .btn:hover:after,
.copy-to-clipboard-wrapper .btn.copied:before,
.copy-to-clipboard-wrapper .btn.copied:after {
    display: block;
    opacity: 1;
}

.copy-to-clipboard-wrapper .btn.copied:before {
    content: 'Copied!';
}

/* ===== 121. BOXED LAYOUT ===== */

/* ----- 121.1 Sticky Navigation ----- */
html.boxed .nav-secondary.sticky-active {
    max-width: 1200px;
    left: auto !important;
}




/* ===== BOOTSTRAP MISC REPLACEMENTS ===== */

/* Position */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Top/Bottom/Start/End */
.top-0 { top: 0 !important; }
.top-50 { top: 50% !important; }
.top-100 { top: 100% !important; }
.bottom-0 { bottom: 0 !important; }
.bottom-50 { bottom: 50% !important; }
.bottom-100 { bottom: 100% !important; }
.start-0 { left: 0 !important; }
.start-50 { left: 50% !important; }
.start-100 { left: 100% !important; }
.end-0 { right: 0 !important; }
.end-50 { right: 50% !important; }
.end-100 { right: 100% !important; }

/* Translate Middle */
.translate-middle {
    transform: translate(-50%, -50%) !important;
}

.translate-middle-x {
    transform: translateX(-50%) !important;
}

.translate-middle-y {
    transform: translateY(-50%) !important;
}

/* Visibility */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Image Fluid */
.img-fluid {
    max-width: 100%;
    height: auto;
}
