/* assets/css/contact.css - Monochrome Editorial Concept */

body {
    background-color: #ffffff;
    color: #111111;
}

/* --- 1. Editorial Header --- */
.section--contact-editorial {
    padding: 140px 0 80px;
    background: #ffffff;
}

.editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 40px;
    border-bottom: 2px solid #111;
    margin-bottom: 60px;
}

.ed-title {
    font-size: clamp(50px, 8vw, 100px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    margin: 0;
}

.ed-desc-wrap {
    max-width: 400px;
    text-align: right;
}

.ed-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
}

.ed-contact-info span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.5px;
    color: #111;
}

/* --- 2. Editorial Form Grid --- */
.editorial-form-wrapper {
    width: 100%;
}

.ed-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 40px 0;
}

.ed-col-label {
    width: 30%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.ed-num {
    font-family: monospace;
    font-size: 12px;
    color: #001A8E;
    /* 포인트 컬러 */
    margin-bottom: 8px;
    font-weight: 700;
}

.ed-col-label label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #111;
}

.ed-col-input {
    width: 70%;
}

/* --- 3. Block Radios (Sector Selection) --- */
.ed-block-radios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ed-block-card {
    cursor: pointer;
}

.ed-block-card input {
    display: none;
}

.block-inner {
    border: 1px solid #d0d0d0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100%;
    background: #fafafa;
}

.block-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111;
    transition: color 0.3s;
}

.block-sub {
    font-size: 12px;
    color: #888;
    font-family: monospace;
    transition: color 0.3s;
}

.ed-block-card:hover .block-inner {
    border-color: #111;
    background: #fff;
}

.ed-block-card input:checked+.block-inner {
    background: #111;
    border-color: #111;
}

.ed-block-card input:checked+.block-inner .block-title,
.ed-block-card input:checked+.block-inner .block-sub {
    color: #fff;
}

/* --- 4. Input Fields (Floating Labels) --- */
.ed-input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
}

.ed-input-wrap {
    position: relative;
    width: 100%;
}

.ed-input-wrap input,
.ed-input-wrap textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #d0d0d0;
    background: transparent;
    padding: 16px 0 8px;
    font-size: 18px;
    color: #111;
    font-weight: 500;
    transition: border-color 0.3s;
    border-radius: 0;
}

.ed-input-wrap textarea {
    min-height: 100px;
    resize: none;
}

.ed-input-wrap input:focus,
.ed-input-wrap textarea:focus {
    outline: none;
    border-bottom-color: #111;
}

.ed-placeholder {
    position: absolute;
    top: 16px;
    left: 0;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    pointer-events: none;
    transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease;
    transform-origin: left top;
}

.ed-input-wrap input:focus~.ed-placeholder,
.ed-input-wrap input:not(:placeholder-shown)~.ed-placeholder,
.ed-input-wrap textarea:focus~.ed-placeholder,
.ed-input-wrap textarea:not(:placeholder-shown)~.ed-placeholder {
    transform: translateY(-20px);
    font-size: 11px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.5px;
}

/* --- 5. File Drop Area --- */
.ed-file-drop {
    border: 1px dashed #d0d0d0;
    background: #fafafa;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.ed-file-drop:hover {
    border-color: #111;
    background: #fff;
}

.drop-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.plus-icon {
    font-size: 24px;
    font-weight: 300;
    color: #111;
}

.drop-msg {
    font-size: 14px;
    color: #666;
}

.hidden-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.ed-file-list {
    list-style: none;
    padding: 0;
    margin-top: 16px;
}

.ed-file-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.file-del-btn {
    background: none;
    border: none;
    color: #111;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
}

/* --- 6. Submit Row --- */
.ed-submit-row {
    border-bottom: none;
    align-items: center;
}

.ed-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.ed-checkbox input {
    display: none;
}

.chk-indicator {
    width: 18px;
    height: 18px;
    border: 1px solid #111;
    position: relative;
    transition: background 0.2s;
}

.ed-checkbox input:checked+.chk-indicator {
    background: #111;
}

.ed-checkbox input:checked+.chk-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.chk-text {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.ed-submit-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 24px 32px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.ed-submit-btn:hover {
    background: #001A8E;
}

.ed-submit-btn .arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.ed-submit-btn:hover .arrow {
    transform: translateX(10px);
}

/* --- 7. Footer Location (Map Included) --- */
.ed-location {
    display: flex;
    gap: 40px;
    padding-top: 60px;
    border-top: 2px solid #111;
    margin-top: 60px;
}

.loc-label {
    width: 30%;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.loc-address-wrap {
    width: 70%;
}

.loc-address {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 24px;
}

.loc-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-decoration: underline;
}

/* 구글 지도 컨테이너 & 필터 효과 */
.ed-map-container {
    width: 100%;
    height: 350px;
    border: 1px solid #d0d0d0;
    background: #fafafa;
    overflow: hidden;
}

.ed-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    /* 모노크롬 컨셉에 맞게 흑백 처리 (하이엔드 감성) */
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.4s ease;
}

/* 지도에 마우스를 올리면 컬러로 전환 */
.ed-map-container iframe:hover {
    filter: grayscale(0%) contrast(1);
}

/* --- Responsive (모바일 반응형 완벽 대응) --- */
@media (max-width: 980px) {

    /* 1. 상단 타이틀 영역 가로 -> 세로 정렬 */
    .editorial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 30px;
        margin-bottom: 40px;
    }

    .ed-desc-wrap {
        max-width: 100%;
        text-align: left;
        /* 우측 정렬된 텍스트를 좌측으로 */
    }

    /* 2. 폼 영역: 라벨(30%)과 입력칸(70%)을 100%로 풀어서 위아래 배치 */
    .ed-row {
        flex-direction: column;
        padding: 30px 0;
        gap: 16px;
    }

    .ed-col-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .ed-col-input {
        width: 100%;
    }

    /* 3. 섹터 선택(방산, 메모리, 일반) 가로 3칸 -> 세로 1칸 */
    .ed-block-radios {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 4. 입력칸(회사명, 담당자 등) 가로 2칸 -> 세로 1칸 */
    .ed-input-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* 5. 제출 버튼 및 동의 체크박스 정렬 */
    .ed-submit-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        border-bottom: none;
    }

    .ed-submit-btn {
        width: 100%;
        justify-content: center;
        /* 모바일에서 텍스트 중앙 정렬 원하시면 center 유지 */
    }

    #privacyWarning {
        bottom: -24px;
    }

    /* 6. 첨부파일 UI 모바일 크기 조절 */
    .ed-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: relative;
    }

    .file-del-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    /* 7. 기존에 있던 지도 부분 반응형 유지 */
    .ed-location {
        flex-direction: column;
        gap: 16px;
        margin-top: 40px;
        padding-top: 40px;
    }

    .loc-label,
    .loc-address-wrap {
        width: 100%;
    }

    .ed-map-container {
        height: 250px;
    }

    /* 8. 커스텀 성공 알림(Toast) 모바일 반응형 */
    .m3-toast {
        width: 90%;
        /* 모바일 화면 너비의 90%로 맞춰 양옆 여백 생성 */
        max-width: 400px;
        padding: 14px 20px;
        /* 패딩 살짝 축소 */
        gap: 12px;
        top: 20px;
        /* 모바일은 상단 여백을 조금 줄여서 깔끔하게 */
        box-sizing: border-box;
    }

    .toast-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .toast-desc {
        font-size: 13px;
        /* 모바일에 맞게 글씨 크기 조정 */
        word-break: keep-all;
        /* 텍스트 줄바꿈 깔끔하게 */
    }
}

/* --- 5. File Drop Area & Rich File List --- */
.ed-file-drop {
    border: 1px dashed #d0d0d0;
    background: #fafafa;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    /* 살짝 부드러운 외곽선 추가 */
}

.ed-file-drop:hover {
    border-color: #111;
    background: #fff;
}

.drop-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.plus-icon {
    font-size: 28px;
    font-weight: 300;
    color: #111;
    margin-bottom: 4px;
}

.drop-msg {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.drop-formats {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.hidden-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* 첨부 파일 리스트 (리치 UI) */
.ed-file-list {
    list-style: none;
    padding: 0;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ed-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ed-file-item:hover {
    border-color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

/* 확장자 뱃지 */
.file-type-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.file-name {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

/* 삭제 버튼 */
.file-del-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s, transform 0.2s;
}

.file-del-btn:hover {
    color: #ff3b30;
    transform: scale(1.1);
}

/* ✅ 체크박스 미동의 시 흔들림(Shake) 효과 및 붉은색 경고 테두리 */
@keyframes shakeWarning {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.shake-warning .chk-indicator {
    border-color: #ff3b30 !important;
    background-color: #fff0f0 !important;
}

.shake-warning .chk-text {
    color: #ff3b30 !important;
}

.shake-warning {
    animation: shakeWarning 0.4s ease-in-out;
}

/* ✅ 커스텀 성공 알림 (Toast) 디자인 및 모션 */
.m3-toast {
    position: fixed;
    top: 40px;
    left: 50%;
    /* 화면 위쪽에 숨겨둠 */
    transform: translate(-50%, -150px);
    opacity: 0;
    background: #111;
    color: #fff;
    padding: 16px 28px 16px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    pointer-events: none;
    /* 통통 튀는(Bouncy) 느낌의 타이밍 함수 적용 */
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
}

/* JS에서 show 클래스를 붙이면 화면으로 내려옴 */
.m3-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #fff;
    color: #111;
    border-radius: 50%;
    font-weight: 900;
    font-size: 14px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: #8bb4ff;
    /* M3TECH 포인트 컬러 */
    letter-spacing: 1px;
}

.toast-desc {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}