/* ============================================
   Syncle Footer - Toss Design System
   토스 스타일 프리미엄 푸터 컴포넌트

   Design Tokens: design-tokens.css, toss-design-system.css
   Naming: BEM (.footer__element--modifier)
   Approach: Mobile-first responsive
   ============================================ */

/* ===== Base Footer ===== */
.footer {
    position: relative;
    background: var(--toss-bg-white, #FFFFFF);
    border-top: 1px solid var(--toss-line-weak, #F2F4F6);
    margin-top: var(--toss-space-5, 20px);
    padding: var(--toss-space-8, 32px) 0 var(--toss-space-6, 24px);
}

.footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--toss-space-5, 20px);
}

/* ===== Main Layout ===== */
.footer__main {
    display: flex;
    flex-direction: column;
    gap: var(--toss-space-8, 32px);
    margin-bottom: var(--toss-space-8, 32px);
}

/* ===== Brand Section ===== */
.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--toss-space-3, 12px);
}

.footer__logo-container {
    display: flex;
    align-items: center;
    gap: var(--toss-space-2, 8px);
}

.footer__logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.footer__tagline {
    font-size: 14px;
    font-weight: 400;
    color: var(--toss-gray-600, #6B7684);
    margin: 0;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* ===== App Download ===== */
.footer__app-download {
    display: flex;
    align-items: center;
    gap: var(--toss-space-2, 8px);
    margin-top: var(--toss-space-2, 8px);
}

.footer__app-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--toss-radius-sm, 8px);
    transition:
        transform var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1)),
        opacity var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

.footer__app-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.footer__app-badge:active {
    transform: scale(0.98);
}

.footer__app-badge img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer__app-badge:focus-visible {
    outline: 2px solid var(--toss-blue, #3182F6);
    outline-offset: 2px;
}

/* ===== Content Section ===== */
.footer__content {
    display: flex;
    flex-direction: column;
    gap: var(--toss-space-5, 20px);
}

/* ===== Navigation Links ===== */
.footer__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--toss-space-2, 8px);
}

.footer__link {
    font-size: 13px;
    font-weight: 400;
    color: var(--toss-gray-600, #6B7684);
    text-decoration: none;
    transition: color var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1));
    word-break: keep-all;
    padding: var(--toss-space-1, 4px) 0;
    /* Button Reset (인재채용 버튼용) */
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.footer__link:hover {
    color: var(--toss-gray-900, #191F28);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.footer__link--emphasis {
    font-weight: 600;
    color: var(--toss-gray-900, #191F28);
}

.footer__link--emphasis:hover {
    color: var(--toss-blue, #3182F6);
}

/* 건의하기 버튼 특별 스타일 */
.footer__link--suggestion {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--toss-gray-600, #6B7684);
    transition: all 0.2s ease;
}

.footer__link--suggestion:hover {
    color: var(--toss-blue, #3182F6);
}

.footer__link--suggestion svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.footer__link--suggestion:hover svg {
    transform: scale(1.1);
    color: #ffc107 !important;
}

.footer__separator {
    color: var(--toss-gray-300, #D1D6DB);
    font-size: 11px;
    user-select: none;
}

/* ===== Company Info ===== */
.footer__company {
    font-style: normal;
}

.footer__info-inline {
    font-size: 12px;
    line-height: 1.8;
    color: var(--toss-gray-500, #8B95A1);
    margin: 0 0 var(--toss-space-1, 4px) 0;
    word-break: keep-all;
}

.footer__info-inline:last-child {
    margin-bottom: 0;
}

.footer__info-item-inline {
    white-space: nowrap;
}

.footer__info-label {
    font-weight: 500;
    color: var(--toss-gray-600, #6B7684);
    margin-right: 2px;
}

.footer__info-sep {
    margin: 0 6px;
    color: var(--toss-gray-300, #D1D6DB);
    font-size: 11px;
}

/* ===== Social Links ===== */
.footer__social {
    display: flex;
    gap: var(--toss-space-3, 12px);
    margin-top: var(--toss-space-2, 8px);
    margin-left: -2px; /* 첫 아이콘 좌측 정렬 보정 */
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--toss-radius-sm, 8px);
    color: var(--toss-gray-500, #8B95A1);
    background: transparent;
    border: none;
    cursor: pointer;
    transition:
        color var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1)),
        background-color var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1)),
        transform var(--toss-duration-fast, 150ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

.footer__social-link:hover {
    color: var(--toss-gray-900, #191F28);
    background-color: var(--toss-gray-100, #F2F4F6);
    transform: translateY(-1px);
}

.footer__social-link:active {
    transform: scale(0.96);
    background-color: var(--toss-gray-200, #E5E8EB);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}

.footer__social-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--toss-radius-sm, 8px);
}

/* ===== Disclaimer ===== */
.footer__disclaimer {
    margin-top: var(--toss-space-6, 24px);
    padding-top: var(--toss-space-5, 20px);
    border-top: 1px solid var(--toss-line-weak, #F2F4F6);
}

.footer__disclaimer-text {
    font-size: 12px;
    font-weight: 400;
    color: var(--toss-gray-500, #8B95A1);
    line-height: 1.7;
    margin: 0;
    text-align: center;
    word-break: keep-all;
}

/* ===== Copyright ===== */
.footer__copyright {
    margin-top: var(--toss-space-4, 16px);
    text-align: center;
}

.footer__copyright small {
    font-size: 12px;
    font-weight: 400;
    color: var(--toss-gray-400, #ADB5BD);
    letter-spacing: 0.01em;
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus Visible - 키보드 네비게이션 */
.footer__link:focus-visible {
    outline: 2px solid var(--toss-blue, #3182F6);
    outline-offset: 2px;
    border-radius: var(--toss-radius-sm, 8px);
    text-decoration: none;
}

.footer__social-link:focus-visible {
    outline: 2px solid var(--toss-blue, #3182F6);
    outline-offset: 2px;
}

/* Skip to content hint (Screen reader) */
.footer__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced Motion - 모션 감소 선호 사용자 */
@media (prefers-reduced-motion: reduce) {
    .footer,
    .footer * {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   Responsive - Mobile First
   ============================================ */

/* Tablet (768px+) */
@media (min-width: 768px) {
    .footer {
        padding: var(--toss-space-10, 40px) 0 var(--toss-space-8, 32px);
    }

    .footer__inner {
        padding: 0 var(--toss-space-6, 24px);
    }

    .footer__main {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: var(--toss-space-10, 40px);
        align-items: start;
    }

    .footer__brand {
        gap: var(--toss-space-3, 12px);
    }

    .footer__logo {
        height: 32px;
    }

    .footer__nav {
        gap: var(--toss-space-2, 8px);
    }

    .footer__link {
        font-size: 13px;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .footer__inner {
        padding: 0 var(--toss-space-8, 32px);
    }

    .footer__main {
        grid-template-columns: 280px 1fr;
        gap: var(--toss-space-16, 64px);
    }

    .footer__link {
        font-size: 14px;
    }

    .footer__info-inline {
        font-size: 13px;
    }
}

/* ============================================
   Toast Notification (Toss Style)
   기존 toast.css와 통합 가능하나 footer 전용으로 유지
   ============================================ */

.footer-toast {
    position: fixed;
    bottom: var(--toss-space-6, 24px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--toss-gray-900, #191F28);
    color: var(--toss-text-white, #FFFFFF);
    padding: var(--toss-space-4, 16px) var(--toss-space-5, 20px);
    border-radius: var(--toss-radius-md, 12px);
    box-shadow: var(--toss-shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.08));
    font-size: 14px;
    font-weight: 500;
    z-index: var(--z-tooltip, 10000);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--toss-duration-normal, 250ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1)),
        transform var(--toss-duration-normal, 250ms) var(--toss-ease, cubic-bezier(0.33, 1, 0.68, 1)),
        visibility var(--toss-duration-normal, 250ms);
    display: flex;
    align-items: center;
    gap: var(--toss-space-3, 12px);
    white-space: nowrap;
}

.footer-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.footer-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer-toast__icon svg {
    width: 100%;
    height: 100%;
}

.footer-toast__message {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Toast Animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer-toast {
        transition: opacity var(--toss-duration-fast, 150ms);
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Toast Position */
@media (max-width: 767px) {
    .footer-toast {
        bottom: 80px; /* 모바일 하단 네비게이션 위 */
        left: var(--toss-space-4, 16px);
        right: var(--toss-space-4, 16px);
        transform: translateX(0) translateY(20px);
        white-space: normal;
        text-align: center;
        justify-content: center;
    }

    .footer-toast.show {
        transform: translateX(0) translateY(0);
    }
}
