@charset "utf-8";

/* AMI 통합 문의 폼 전용 최적화 코어 스타일 */
.ami-integrated-form {
    max-width: 768px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: 'Malgun Gothic', dotum, sans-serif;
    background-color: #f8fafc;
}

.ami-form-header {
    text-align: center;
    margin-bottom: 30px;
}
.ami-form-header h1 {
    font-size: 28px;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 8px;
}
.ami-form-header p {
    font-size: 15px;
    color: #64748b;
}

/* 카드 컴포넌트 디자인 */
.ami-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title h2 {
    font-size: 18px;
    color: #0f172a;
    font-weight: 600;
    display: inline-block;
    margin: 0 0 6px 0;
}
.card-title span {
    font-size: 13px;
    color: #64748b;
    margin-left: 6px;
}
.card-title p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px 0;
}

/* 체크박스 및 라디오 버튼 커스텀 스타일 전환 */
.ami-grid-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.ami-grid-options.col-4 {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 600px) {
    .ami-grid-options, .ami-grid-options.col-4 {
        grid-template-columns: 1fr !important;
    }
}

.ami-check-btn, .ami-radio-btn {
    position: relative;
    display: block;
    cursor: pointer;
}
.ami-check-btn input, .ami-radio-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ami-check-btn span, .ami-radio-btn span {
    display: block;
    padding: 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
}
.ami-check-btn input:checked + span, .ami-radio-btn input:checked + span {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
    font-weight: 600;
}

/* 특수 옵션 스타일 (모르겠습니다 하단 격리 강조) */
.unknown-option span {
    background: #f8fafc;
    border-style: dashed;
}

/* 소프트 알림 바 스타일 */
.soft-alert-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #ffe4e6;
    padding: 14px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
}

/* 경고 및 가이드 문구 */
.step-warning-text {
    color: #e11d48;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 600;
}
.step-info-text {
    margin-top: 12px;
    color: #0284c7;
    font-size: 13px;
    font-weight: 500;
}

/* 서브 섹션 구분 */
.ami-sub-section {
    margin-top: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}
.ami-sub-section h3 {
    font-size: 14px;
    color: #475569;
    margin: 0 0 10px 0;
}

.ami-sub-conditional {
    margin-top: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #0284c7;
}

/* 인라인 주입 텍스트 및 입력 에어리어 컨트롤 */
.ami-text-inline {
    border: none;
    border-bottom: 1px solid #cbd5e1;
    background: transparent;
    padding: 2px 5px;
    width: 100px;
    color: #0f172a;
}
.ami-text-inline:focus {
    outline: none;
    border-bottom-color: #0284c7;
}
.ami-input-ctrl, .ami-textarea-ctrl {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.form-row {
    margin-bottom: 15px;
}
.form-row label {
    display: block;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
    font-weight: 600;
}
.input-desc-gray {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

/* 제출 영역 고정 구성 */
.ami-submit-area {
    margin-top: 40px;
    text-align: center;
}
.ami-btn-submit {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.4);
    transition: background 0.2s;
}
.ami-btn-submit:hover {
    background: #0369a1;
}
.ami-btn-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}
.ami-disclaimer {
    margin-top: 14px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

/* 뷰 테이블 스펙 */
.ami-view-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.ami-view-table th {
    background: #f1f5f9;
    padding: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
}
.ami-view-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}
.ami-tag-blue {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.ami-pre-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-family: inherit;
    white-space: pre-wrap;
    line-height: 1.6;
}
/* STEP 4-1. 견적 관련 요청 버튼 높이 균일화 및 수직 중앙 정렬 */
#card_step4_1 .ami-grid-options .ami-check-btn span {
    height: 72px;          /* 두 줄짜리 4번 버튼 높이에 맞춰 전체 고정 */
    display: flex;         /* 수직/수평 중앙 정렬을 위한 flex 전환 */
    align-items: center;   /* 상하 정중앙 정렬 */
    justify-content: center; /* 좌우 정중앙 정렬 */
    padding: 10px 14px;    /* 고정 높이 밸런스에 맞게 내부 여백 조정 */
    line-height: 1.4;      /* 두 줄 줄바꿈 시 자연스러운 행간 고정 */
    box-sizing: border-box; /* 높이(height)에 패딩 두께 포함 */
}

/* =================================================================
   AMI 통합 문의 상세보기(View) 전용 레이아웃 보완 스타일 
==================================================================== */
.ami-view-container .ami-view-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-top: 2px solid #cbd5e1;
}

.ami-view-container .ami-view-table th {
    background: #f8fafc;
    padding: 14px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

.ami-view-container .ami-view-table td {
    padding: 14px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
}

/* 첨부파일 이미지 스케일 폭 강제 제한 (터짐 방지 코어) */
#bo_v_img {
    margin-top: 15px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

#bo_v_img img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 하단 제어 버튼 컴포넌트 모던 Flex 배치화 */
.ami-view-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0 5px;
}

.ami-view-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.2s;
    box-sizing: border-box;
}

.ami-btn-delete {
    background: #f1f5f9;
    color: #64748b !important;
    border: 1px solid #cbd5e1;
}

.ami-btn-delete:hover {
    background: #fee2e2;
    color: #ef4444 !important;
    border-color: #fca5a5;
}

.ami-btn-list {
    background: #0284c7;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
}

.ami-btn-list:hover {
    background: #0369a1;
}
/* =================================================================
   AMI 통합 문의 리스트(List) 버튼 레이아웃 정렬 Fix
==================================================================== */
/* 상단 토탈카운트 및 우측 버튼바 정렬 */
#bo_btn_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

/* 버튼들을 감싸는 ul 태그를 가로 Flex 배치로 변경 */
.btn_bo_user {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.btn_bo_user li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 하단 선택삭제/선택복사 버튼 박스 정렬 */
.bo_fx {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    width: 100%;
}

.bo_fx .btn_bo_user {
    width: 100%;
}
/* =================================================================
   AMI 통합 문의 리스트 페이지 전체 가로폭 제한 및 중앙 정렬
==================================================================== */
#bo_list {
    max-width: 1200px;  /* 브라우저가 아무리 넓어져도 1200px 고정 */
    margin: 0 auto;     /* 좌우 여백을 자동으로 잡아 중앙 정렬 */
    padding: 20px 15px; /* 양옆 레이아웃이 벽에 붙지 않도록 안전 여백 제공 */
    box-sizing: border-box;
    width: 100%;
}