/* Site footer — shared partial (ERP + POS employee variants) */

:root {
    --erp-footer-height: 3.25rem;
}

.erp-footer {
    width: 100%;
    min-height: var(--erp-footer-height);
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    box-sizing: border-box;
}

.erp-footer__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.erp-footer p {
    margin: 0;
    opacity: 0.9;
    word-break: break-word;
    text-align: center;
    line-height: 1.4;
}

.erp-footer a {
    text-decoration: none;
    transition: opacity var(--duration-fast, 150ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.erp-footer a:hover {
    opacity: 0.7;
}

.erp-footer__main,
.erp-footer__credit-long,
.erp-footer__credit-short,
.erp-footer__divider {
    display: inline;
}

.erp-footer__credit-short {
    display: none;
}

/* ERP variant — construction admin + auth */
.erp-footer--erp {
    position: fixed;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width, 260px);
    width: auto;
    z-index: var(--z-navbar, 90);
    background: var(--color-surface, #FFFCF3);
    border-top: 1px solid var(--color-border, #E8DFD0);
    color: var(--color-text-muted, #7A6558);
    transition: left var(--duration-normal, 250ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.erp-app[data-sidebar='collapsed'] .erp-footer--erp {
    left: var(--sidebar-width-collapsed, 72px);
}

.erp-footer--erp a {
    color: var(--color-accent, #9B303D);
    font-weight: var(--font-weight-semibold, 600);
}

body.erp-auth-body .erp-footer--erp {
    position: static;
    width: 100%;
    left: auto;
    right: auto;
}

/* POS employee variant — matches ERP theme tokens */
.erp-footer--pos {
    position: static;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    box-shadow: var(--shadow-sm);
}

.erp-footer--pos a {
    color: var(--color-accent);
}

/* Content clearance utility (EOD / long POS pages) */
.erp-page--footer-clear {
    padding-bottom: calc(var(--erp-footer-height) + 1.5rem);
}

/* Responsive — short credit on narrow viewports */
@media (max-width: 767px) {
    .erp-footer {
        padding: 10px 0;
        font-size: 13px;
        min-height: 45px;
    }

    .erp-footer__main,
    .erp-footer__credit-long,
    .erp-footer__divider {
        display: none;
    }

    .erp-footer__credit-short {
        display: inline;
    }
}

@media (max-width: 575px) {
    .erp-footer {
        padding: 10px 0;
        font-size: 12px;
        min-height: 40px;
    }

    .erp-footer__content {
        padding: 0 10px;
    }
}

@media (max-width: 1023px) {
    .erp-footer--erp {
        left: 0;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .erp-footer {
        padding: 6px 0;
        font-size: 11px;
        min-height: 30px;
    }
}

@media print {
    .erp-footer {
        display: none !important;
    }
}
