@charset "utf-8";

/* ============================================
   카카오 알림톡 공통 스타일 (통합)
   - 계정 관리 모달, 알림톡 관리 페이지 양쪽에서 사용
   ============================================ */

/* ===== 상태 표시 ===== */
.alimtalk-user-info {
  max-width: 100%;
  overflow: hidden;
  display: inline-block;
}

.alimtalk-user-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.alimtalk-user-details,
.alimtalk-user-org {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.alimtalk-status-success {
  color: #28a745;
  font-weight: 500;
}

.alimtalk-status-failed {
  color: #dc3545;
  font-weight: 500;
}

.alimtalk-status-pending,
.alimtalk-status-processing {
  color: #ffc107;
  font-weight: 500;
}

.alimtalk-status-default {
  color: #6c757d;
}

/* ===== 카카오 프리뷰 레이아웃 (2단 배치) ===== */
.kakao-preview-row {
  display: flex;
  gap: 20px;
  padding: 0;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.kakao-preview-select-col {
  flex: 1 1 0;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.kakao-preview-preview-col {
  flex: 0 0 280px;
  min-width: 260px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.kakao-preview-label {
  font-weight: 700;
  color: #3a3a3a;
  font-size: 0.9rem;
  padding: 10px 0 8px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #FFE802;
  margin-bottom: 10px;
  width: 100%;
}

.kakao-preview-label i {
  color: #401C1D;
  margin-right: 6px;
  font-size: 0.85rem;
}

/* ===== 태스크 선택 리스트 ===== */
.kakao-template-type-scroll {
  max-height: 300px;
  overflow-y: auto;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #e8e8e8;
  padding: 8px;
}

.template-group-title {
  font-weight: 700;
  font-size: 0.78rem;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 10px 4px;
  margin-top: 4px;
  background: #f0f0f0;
  border-radius: 6px;
}

.template-group-title:first-child {
  margin-top: 0;
}

.template-item {
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  padding: 8px 12px;
  user-select: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 2px 0;
}

.template-item:hover {
  background: #fff9e0;
}

.template-item.selected,
.template-item:focus {
  background: #FFE802;
  color: #401C1D;
  font-weight: 600;
  outline: none;
  box-shadow: 0 1px 4px rgba(254, 229, 0, 0.3);
}

.template-item .item-icon {
  color: #bbb;
  font-size: 0.8rem;
}

.template-item.selected .item-icon {
  color: #401C1D;
}

/* ===== 카카오 프리뷰 박스 (통일 디자인) ===== */
.kakao-preview-box {
  border: none;
  border-radius: 16px;
  background: #b2c7d9;
  width: 280px;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.kakao-preview-header {
  background: #FFE802;
  color: #401C1D;
  font-weight: 600;
  text-align: center;
  padding: 8px 14px;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.kakao-preview-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 180px;
}

.kakao-preview-image-guide {
  color: #888;
  text-align: center;
  font-size: 0.85rem;
  padding: 40px 10px;
}

.kakao-preview-body {
  white-space: pre-wrap;
  font-size: 0.82rem;
  color: #111;
  line-height: 1.6;
  margin-bottom: 0;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 14px 16px;
}

/* 바로가기 버튼이 보일 때 pre 하단 radius 제거 */
.kakao-preview-body.has-button {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

/* 바로가기 버튼 영역 — 본문 흰 영역 내부 */
.kakao-preview-btn-area {
  background: #fff;
  border-radius: 0 0 12px 12px;
  padding: 4px 16px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.kakao-preview-btn-area button {
  width: 100%;
  padding: 8px;
  background: #f0f0f0;
  color: #555;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
}

.kakao-preview-length {
  padding: 4px 12px 6px;
  text-align: right;
  color: #8e8e93;
  font-size: 0.75rem;
  background: transparent;
}

/* ===== 알림톡 관리 페이지용 프리뷰 (통일) ===== */
.alimtalk-preview-box {
  border: none;
  border-radius: 16px;
  background: #b2c7d9;
  max-width: 280px;
  margin: 0 auto;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.alimtalk-preview-header {
  background: #FFE802;
  color: #401C1D;
  font-weight: 600;
  text-align: center;
  padding: 8px 14px;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.alimtalk-preview-body {
  white-space: pre-wrap;
  font-size: 0.82rem;
  color: #111;
  line-height: 1.65;
  margin: 10px;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 14px 16px;
  min-height: 80px;
  word-break: break-word;
}

/* ===== 카카오 스타일 버튼 (통일) ===== */
.btn-kakao-white {
  display: inline-block !important;
  background: #FFE802 url('/mes/images/btn_kakao_bi.png') no-repeat left center !important;
  background-size: auto 100% !important;
  color: #401C1D !important;
  border: 1px solid #e5cc00 !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 8px 26px 9px 51px !important;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.btn-kakao-white:disabled {
  filter: grayscale(1);
  opacity: 0.7;
  cursor: not-allowed;
}

.kakao-icon {
  display: none !important;
}

.sys-table .btn-kakao-white {
  padding: 6px 20px 6px 41px !important;
  font-size: 0.8rem;
}

/* ===== 반응형 ===== */
@media (max-width: 767px) {
  .kakao-preview-row {
    flex-direction: column;
    padding: 0;
    gap: 16px;
  }

  .kakao-preview-select-col,
  .kakao-preview-preview-col {
    min-width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .kakao-preview-box {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}