/* Prevent any child width calculation from overflowing */
.footer-container {
    background: var(--gradient-main);
    border-top: 0.125rem solid var(--highlight-colour);
    display: flex;
    flex-direction: column;
    width: 100%;

    padding: 0.75rem 1rem 1rem;

    row-gap: 2rem;
    font-size: 0.875rem;
    box-sizing: border-box;       /* 🚀 FIX */
    overflow-x: hidden;           /* 🚀 Safety net */
}

.footer-top {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    width: 100%;
    padding-bottom: 0.25rem;
    box-sizing: border-box;       /* 🚀 */
}

.footer-bottom {
    display: flex;
    justify-content: center;      /* 🚀 Avoids spreading too wide */
    align-items: center;
    flex-wrap: wrap;

    width: 100%;
    max-width: 100%;              /* 🚀 Prevent overflow with flex */
    gap: 1.5rem;                /* ~10px */
    padding-top: 0.25rem;
    box-sizing: border-box;       /* 🚀 */
}

.footer-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    text-align: center;

    max-width: 100%;              /* 🚀 Never exceed container */
    flex-shrink: 1;               /* 🚀 Shrink safely */
}

/* Text + links */
.footer-item p,
.footer-item a {
    color: white;
    font-size: 0.875rem;
    /* text-decoration: none; */
    margin: 0;
    transition: color 0.2s ease;
}

.footer-item a:hover {
    color: var(--highlight-colour);
}

/* Ref code */
.footer-item-refcode p {
    color: white;
    font-size: 0.875rem;
    margin: 0;
}

.footer-item-text-refcode {
    color: white;
    border: 0.0625rem solid white;
    padding: 0.2rem 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.footer-item-text-refcode:hover {
    color: var(--highlight-colour);
    border-color: var(--highlight-colour);
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 1.25rem;
    }
}