/* Team Apply Leave modal (loaded from modal/team-apply-leave-modal.html) - scoped */
#teamApplyLeaveModal.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}
#teamApplyLeaveModal .modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 780px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: teamApplyLeaveModalSlideIn 0.3s ease;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
@keyframes teamApplyLeaveModalSlideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
#teamApplyLeaveModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px;
  border-bottom: 2px solid rgba(237, 32, 71, 0.1);
}
#teamApplyLeaveModal .modal-title {
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(135deg, #ed2047, #f26225);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#teamApplyLeaveModal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
#teamApplyLeaveModal .modal-close:hover {
  background: rgba(237, 32, 71, 0.1);
  color: #ed2047;
  transform: rotate(90deg);
}
#teamApplyLeaveModal .modal-body {
  padding: 0 30px;
  overflow-y: auto;
  max-height: calc(80vh - 160px);
}
#teamApplyLeaveModal .form-group { margin-bottom: 20px; }
#teamApplyLeaveModal .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}
#teamApplyLeaveModal .form-group input,
#teamApplyLeaveModal .form-group select,
#teamApplyLeaveModal .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
#teamApplyLeaveModal .form-group input:focus,
#teamApplyLeaveModal .form-group select:focus,
#teamApplyLeaveModal .form-group textarea:focus {
  border-color: #ed2047;
  outline: none;
  box-shadow: 0 0 0 3px rgba(237, 32, 71, 0.1);
}
#teamApplyLeaveModal .form-group textarea { resize: vertical; min-height: 80px; }
#teamApplyLeaveModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid rgba(237, 32, 71, 0.1);
}
#teamApplyLeaveModal .btn-cancel {
  padding: 10px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#teamApplyLeaveModal .btn-cancel:hover { border-color: #ccc; background: #f8f9fa; }
#teamApplyLeaveModal .btn-save {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to right, #ed2047, #f26225);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#teamApplyLeaveModal .btn-save:hover {
  background: linear-gradient(to right, #d91a3d, #e55a1f);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237, 32, 71, 0.3);
}
#teamApplyLeaveModal .btn-save:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* Number stepper */
#teamApplyLeaveModal .number-stepper {
  display: grid !important;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  height: 44px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}
#teamApplyLeaveModal .stepper-btn {
  height: 100%;
  border: none;
  background: linear-gradient(135deg, #ed2047, #f26225);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  transition: all .2s;
}
#teamApplyLeaveModal .stepper-btn:hover { filter: brightness(0.95); }
#teamApplyLeaveModal .stepper-btn:disabled { opacity: .5; cursor: not-allowed; }
#teamApplyLeaveModal .number-stepper .stepper-value {
  border: none;
  outline: none;
  background: #fff;
  text-align: center;
  height: 100%;
  font-weight: 700;
  font-size: 18px;
  color: #374151;
}
#teamApplyLeaveModal .number-stepper .stepper-value::-webkit-outer-spin-button,
#teamApplyLeaveModal .number-stepper .stepper-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; appearance: none; }
#teamApplyLeaveModal .number-stepper .stepper-value { -moz-appearance: textfield; appearance: textfield; }

/* Custom employee dropdown */
#teamApplyLeaveModal .custom-employee-select:hover { border-color: #ed2047; box-shadow: 0 4px 12px rgba(237, 32, 71, 0.1); }
#teamApplyLeaveModal .custom-employee-select.open .dropdown-arrow { transform: rotate(180deg); }
#teamApplyLeaveModal .team-employee-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}
#teamApplyLeaveModal .team-employee-option:hover {
  background: linear-gradient(135deg, rgba(237, 32, 71, 0.05), rgba(242, 98, 37, 0.05));
}

/* Attachment */
#teamApplyLeaveModal .attachment-container { margin-bottom: 8px; }
#teamApplyLeaveModal .attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}
#teamApplyLeaveModal .attachment-btn:hover {
  border-color: #ed2047;
  background: rgba(237, 32, 71, 0.05);
  color: #ed2047;
}
#teamApplyLeaveModal .attachment-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
#teamApplyLeaveModal .attachment-preview .remove-attachment {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
}
#teamApplyLeaveModal .attachment-preview .remove-attachment:hover { color: #ed2047; }
