@import url("//cdn.jsdelivr.net/gh/sun-typeface/SUIT@2/fonts/variable/woff2/SUIT-Variable.css");
@import url("//cdn.jsdelivr.net/gh/joungkyun/font-d2coding@1.3.2/d2coding.css");
@import url("//fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 1.6rem;
}

/* 폰트 변수 설 */
:root {
    --font-primary:
        "SUIT Variable", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "D2Coding", "Consolas", monospace;
    --font-symbol: "Material Symbols Outlined";
}

/* 220px 이하: 5px 고정 */
@media (max-width: 220px) {
    html {
        font-size: 5px;
    }
}

/* 220px~320px: 5px~8px 선형 스케일링 */
@media (min-width: 220px) and (max-width: 320px) {
    html {
        font-size: calc(5px + (8 - 5) * ((100vw - 220px) / (320 - 220)));
    }
}

/* 320px~800px: 8px~10px 선형 스케일링 */
@media (min-width: 320px) and (max-width: 800px) {
    html {
        font-size: calc(8px + (10 - 8) * ((100vw - 320px) / (800 - 320)));
    }
}

/* 800px 이상: 10px 고정 */
@media (min-width: 800px) {
    html {
        font-size: 10px;
    }
}

/* 일반 텍스트 - SUIT Variable */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
button,
a {
    font-family: var(--font-primary);
}

/* 코드 - D2Coding */
code,
pre,
.code,
.syntax-highlight {
    font-family: var(--font-mono);
}

/* 아이콘 - Material Symbols */
.icon,
.material-symbols-outlined {
    font-family: var(--font-symbol);
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

/* 레이어 컨테이너 스타일 */
.layer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: white;
}

/* 전체화면 레이어 - 기본 스타일 상속 */
.layer-container.fullscreen {
    /* 기본 스타일을 상속받으므로 추가 정의 불필요 */
}

/* 모달 레이어 */
.layer-container.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

/* 슬라이드업 레이어 */
.layer-container.slideup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.layer-container.slideup.active {
    transform: translateY(0);
}

/* 레이어 배경 */
.layer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* 슬라이드업 닫기 애니메이션 */
.layer-container.slideup.closing {
    transform: translateY(100%);
    transition: transform 0.3s ease-in;
}

/* 토스트, 알림, 컨펌 컴포넌트 스타일은 이제 각 컴포넌트 디렉토리로 이동되었습니다:
   - 토스트: /front/common/components/toast/toast.css
   - 알림: /front/common/components/alert/alert.css
   - 컨펌: /front/common/components/confirm/confirm.css
*/

/* 공통 모달/오버레이 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.4);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay--show {
    opacity: 1;
}

/* 공통 모달 컨테이너 스타일 */
.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background-color: white;
    border-radius: 1.2rem;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.1);
    padding: 2.4rem;
    width: 36rem;
    max-width: calc(100vw - 3.2rem);
    opacity: 0;
    transition: all 0.25s ease;
    transform: translate(-50%, -50%) scale(0.95);
}

.modal-container--show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 공통 버튼 스타일 */
.modal-button {
    border: none;
    border-radius: 0.8rem;
    padding: 0.8rem 1.6rem;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button--primary {
    background-color: #3b82f6;
    color: white;
}

.modal-button--primary:hover {
    background-color: #2563eb;
    box-shadow: 0 0.2rem 0.8rem rgba(59, 130, 246, 0.3);
}

.modal-button--secondary {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.modal-button--secondary:hover {
    background-color: #e5e7eb;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.1);
}

/* 공통 아이콘 스타일 */
.modal-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 아이콘 타입별 색상 스타일 */
.modal-icon--info {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.modal-icon--success {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.08);
}

.modal-icon--warning {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.08);
}

.modal-icon--error {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

.modal-icon--help {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.modal-icon--question {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.modal-icon--delete {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* 공통 헤더 스타일 */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-bottom: 1.6rem;
    margin-left: -0.8rem;
}

/* 공통 제목 스타일 */
.modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #111827;
    line-height: 1.4;
    text-align: left;
}

/* 공통 메시지 스타일 */
.modal-message {
    font-size: 1.6rem;
    color: #6b7280;
    text-align: left;
    margin-bottom: 2.4rem;
    line-height: 1.6;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .modal-container {
        width: calc(100vw - 2.4rem);
        padding: 2rem;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .modal-overlay {
        background-color: rgba(0, 0, 0, 0.6);
    }

    .modal-container {
        background-color: #1f2937;
        box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.3);
    }

    .modal-title {
        color: #f9fafb;
    }

    .modal-message {
        color: #d1d5db;
    }
}

