/* ===================================
   원장선택 팝업 스타일
   =================================== */

/* 오버레이 */
.ledger-selection-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.ledger-selection-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 팝업 컨테이너 */
.ledger-selection-popup {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

/* 헤더 */
.ledger-selection-header {
  background: linear-gradient(to right, #3498db, #2980b9);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2574a9;
}

.ledger-selection-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-selection-header h3 i {
  font-size: 18px;
}

.ledger-selection-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.ledger-selection-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 바디 */
.ledger-selection-body {
  padding: 24px;
}

.ledger-selection-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #856404;
}

.ledger-selection-notice i {
  font-size: 16px;
  color: #ffc107;
}

.ledger-selection-form-group {
  margin-bottom: 20px;
}

.ledger-selection-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.ledger-selection-form-group label i {
  margin-right: 6px;
  color: #3498db;
}

.ledger-selection-form-group label .required {
  color: #e74c3c;
  margin-left: 2px;
}

/* 원장 카드 컨테이너 */
.ledger-cards-container {
  display: grid;
  gap: 12px;
}

/* 원장 카드 */
.ledger-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.ledger-card:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.ledger-card.selected {
  border-color: #3498db;
  background: #f0f8ff;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.ledger-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ledger-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
}

.ledger-card-title i {
  font-size: 16px;
  color: #3498db;
}

.ledger-card.selected .ledger-card-title {
  color: #3498db;
}

.ledger-card-check {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ledger-card.selected .ledger-card-check {
  background: #3498db;
  border-color: #3498db;
}

.ledger-card-check i {
  font-size: 11px;
  color: #fff;
  display: none;
}

.ledger-card.selected .ledger-card-check i {
  display: block;
}

.ledger-card-info {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

/* 푸터 */
.ledger-selection-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.ledger-selection-footer .btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-selection-footer .btn i {
  font-size: 12px;
}

.ledger-selection-footer .btn-cancel {
  background: #fff;
  color: #64748b;
  border: 1px solid #cbd5e0;
}

.ledger-selection-footer .btn-cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #475569;
}

.ledger-selection-footer .btn-confirm {
  background: linear-gradient(to right, #3498db, #2980b9);
  color: #fff;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.ledger-selection-footer .btn-confirm:hover {
  background: linear-gradient(to right, #2980b9, #21618c);
  box-shadow: 0 3px 6px rgba(52, 152, 219, 0.3);
  transform: translateY(-1px);
}

.ledger-selection-footer .btn-confirm:active {
  transform: translateY(0);
}

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 반응형 */
@media (max-width: 576px) {
  .ledger-selection-popup {
    width: 95%;
  }
  
  .ledger-selection-body {
    padding: 20px;
  }
  
  .ledger-selection-footer {
    padding: 12px 16px;
  }
}
